Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 08 Nov 2019 16:55:11 -0600
From:      Mike Karels <mike@karels.net>
To:        "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
Cc:        freebsd-net@freebsd.org
Subject:   Re: FreeBSD as multicast router
Message-ID:  <201911082255.xA8MtBq3079126@mail.karels.net>
In-Reply-To: Your message of Fri, 08 Nov 2019 15:03:45 %2B0000. <6F37B324-17FB-49EE-BA22-0BC78BA2C3EC@lists.zabbadoz.net>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201911082255.xA8MtBq3079126>