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)
Sun, Dec 28, 2:07 AM
Unknown Object (File)
Dec 4 2025, 5:22 PM
Unknown Object (File)
Nov 25 2025, 3:13 PM
Unknown Object (File)
Nov 24 2025, 12:09 PM
Unknown Object (File)
Nov 19 2025, 4:46 PM
Unknown Object (File)
Nov 16 2025, 2:01 PM
Unknown Object (File)
Nov 8 2025, 6:19 PM
Unknown Object (File)
Nov 7 2025, 4:04 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