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)
Mon, Mar 17, 1:32 AM
Unknown Object (File)
Fri, Mar 14, 2:08 AM
Unknown Object (File)
Feb 24 2025, 11:44 AM
Unknown Object (File)
Feb 24 2025, 4:01 AM
Unknown Object (File)
Feb 23 2025, 7:40 PM
Unknown Object (File)
Feb 22 2025, 3:48 AM
Unknown Object (File)
Feb 21 2025, 9:52 PM
Unknown Object (File)
Feb 3 2025, 11:51 AM

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