From owner-freebsd-net@freebsd.org Fri Nov 8 22:55:14 2019 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C7E6B16386F for ; Fri, 8 Nov 2019 22:55:14 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail.karels.net (mail.karels.net [216.160.39.52]) by mx1.freebsd.org (Postfix) with ESMTP id 478wb56Sttz42WY for ; Fri, 8 Nov 2019 22:55:13 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail.karels.net (localhost [127.0.0.1]) by mail.karels.net (8.15.2/8.15.2) with ESMTP id xA8MtBq3079126; Fri, 8 Nov 2019 16:55:12 -0600 (CST) (envelope-from mike@karels.net) Message-Id: <201911082255.xA8MtBq3079126@mail.karels.net> To: "Bjoern A. Zeeb" cc: freebsd-net@freebsd.org From: Mike Karels Reply-to: mike@karels.net Subject: Re: FreeBSD as multicast router In-reply-to: Your message of Fri, 08 Nov 2019 15:03:45 +0000. <6F37B324-17FB-49EE-BA22-0BC78BA2C3EC@lists.zabbadoz.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <79124.1573253711.1@mail.karels.net> Date: Fri, 08 Nov 2019 16:55:11 -0600 X-Rspamd-Queue-Id: 478wb56Sttz42WY X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mike@karels.net designates 216.160.39.52 as permitted sender) smtp.mailfrom=mike@karels.net X-Spamd-Result: default: False [-4.13 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[mike@karels.net]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:216.160.39.52]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[karels.net]; REPLYTO_ADDR_EQ_FROM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; IP_SCORE(-1.93)[ip: (-6.45), ipnet: 216.160.0.0/15(-3.15), asn: 209(-0.02), country: US(-0.05)]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:209, ipnet:216.160.0.0/15, country:US]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2019 22:55:14 -0000 > On 8 Nov 2019, at 7:30, Mike Karels wrote: > >> P.S. I rebuild kernel with MROUTING option but > >> ===== > >> # netstat -gs -f inet > >> No IPv4 MROUTING kernel support > >> ===== > > > >> still here > > > > Oh, I see; that's another manifestation of the bug that makes netstat > > fail with the loadable module. It doesn't work if VNET is defined, > > because then there isn't a single stats structure with the expected > > name. My fixed netstat would work. Let me know what FreeBSD version > > you are running, and I can build a fixed version; or I can send a > > patch. > How did you fix netstat? > The proper way to fix this seems to be to stop using lkvm for querying > the stats and properly exporting them in the kernel. They are already exported via sysctl, and fetched that way on a live system. But netstat was stupidly insisting that _mrtstats have a value in the namelist first. That is not true if ip_mroute was loaded as a module, and also if VNET was defined. The fix is not to complain or quit unless sysctl fails, or if operating on a core file and _mrtstat is not found. When I'm happy with the patch, I'll put it in review. I haven't checked yet how other functions deal with VNET (if at all) in a core file. Mike