Page MenuHomeFreeBSD

netlink: add interface notification on link status / flags change.
ClosedPublic

Authored by melifaro on Dec 3 2022, 5:11 PM.
Tags
None
Referenced Files
F107251834: D37597.diff
Sat, Jan 11, 6:49 PM
Unknown Object (File)
Tue, Dec 31, 6:46 AM
Unknown Object (File)
Sun, Dec 22, 10:05 PM
Unknown Object (File)
Dec 10 2024, 5:28 AM
Unknown Object (File)
Nov 18 2024, 3:26 AM
Unknown Object (File)
Nov 18 2024, 3:21 AM
Unknown Object (File)
Nov 18 2024, 1:23 AM
Unknown Object (File)
Oct 6 2024, 6:45 PM
Subscribers

Details

Summary

Add more interface change notifications to netlink:

  1. Add link-state change notifications by subscribing to ifnet_link_event. In the Linux netlink model, link state is reported in 2 places: first is the IFLA_OPERSTATE, which stores state per RFC2863. The second is an IFF_LOWER_UP interface flag. As many applications rely on the latter, reserve 1 bit from if_flags, named as IFF_NETLINK_1. This flag is mapped to IFF_LOWER_UP in the netlink headers. This is done to avoid making applications think this flag is actually supported / presented in non-netlink outputs.
  2. Add flag change notifications, by hooking into rt_ifmsg(). In the netlink model, notification should include the bitmask for the change flags. Update rt_ifmsg() to include such bitmask

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 48605
Build 45491: arc lint + arc unit