Page MenuHomeFreeBSD

IPv4 multicast: fix netstat -g
ClosedPublic

Authored by karels on Mar 21 2022, 8:06 PM.
Tags
None
Referenced Files
F171423786: D34627.diff
Fri, Sep 11, 1:42 AM
F171300862: D34627.id104073.diff
Thu, Sep 10, 6:22 AM
Unknown Object (File)
Sun, Sep 6, 8:17 PM
Unknown Object (File)
Sun, Sep 6, 11:54 AM
Unknown Object (File)
Sun, Sep 6, 3:47 AM
Unknown Object (File)
Fri, Sep 4, 5:09 AM
Unknown Object (File)
Fri, Sep 4, 2:08 AM
Unknown Object (File)
Fri, Sep 4, 1:23 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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 44848
Build 41736: arc lint + arc unit