Page MenuHomeFreeBSD

IPv4 multicast: fix netstat -g
ClosedPublic

Authored by karels on Mar 21 2022, 8:06 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 22, 7:28 AM
Unknown Object (File)
Tue, Apr 21, 12:35 PM
Unknown Object (File)
Sun, Apr 19, 8:47 PM
Unknown Object (File)
Mon, Apr 13, 12:42 AM
Unknown Object (File)
Sat, Apr 11, 5:58 PM
Unknown Object (File)
Wed, Mar 25, 8:34 AM
Unknown Object (File)
Mar 17 2026, 7:01 AM
Unknown Object (File)
Mar 3 2026, 3:54 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