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)
Oct 18 2024, 3:36 AM
Unknown Object (File)
Oct 1 2024, 5:12 PM
Unknown Object (File)
Sep 26 2024, 8:36 AM
Unknown Object (File)
Sep 24 2024, 1:58 PM
Unknown Object (File)
Sep 23 2024, 2:41 AM
Unknown Object (File)
Sep 7 2024, 9:52 PM
Unknown Object (File)
Sep 5 2024, 3:25 PM
Unknown Object (File)
Aug 15 2024, 9:17 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