Page MenuHomeFreeBSD

IPv4 multicast: fix netstat -g
ClosedPublic

Authored by karels on Mar 21 2022, 8:06 PM.
Tags
None
Referenced Files
F166364698: D34627.id.diff
Thu, Aug 13, 4:10 AM
Unknown Object (File)
Wed, Aug 12, 4:54 AM
Unknown Object (File)
Tue, Aug 11, 8:00 AM
Unknown Object (File)
Mon, Aug 3, 3:09 AM
Unknown Object (File)
Sun, Aug 2, 6:15 AM
Unknown Object (File)
Mon, Jul 27, 10:24 AM
Unknown Object (File)
Sun, Jul 26, 3:44 PM
Unknown Object (File)
Sat, Jul 25, 7:19 PM

Details

Summary

The vif structure includes fields at the end which are #ifdef KERNEL,
causing a mismatch between the structure sizes between kernel and
user level. netstat -g failed with an ENOMEM on the sysctl to fetch
the vif table. Change the vif sysctl code in ip_mroute to copy out
only the user-level-visible portion of each table entry.

Test Plan

tested by running netstat -g

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable