HomeFreeBSD

rtsock: subscribe to ifnet eventhandlers instead of direct calls.

Description

rtsock: subscribe to ifnet eventhandlers instead of direct calls.

Stop treating rtsock as a "special" consumer and use already-provided
ifaddr arrival/departure notifications.

MFC after: 2 weeks

Test Plan:

21:05 [0] m@devel0 route -n monitor

-> ifconfig vtnet0.2 create

got message of size 24 on Tue Aug  9 21:05:44 2022
RTM_IFANNOUNCE: interface arrival/departure: len 24, if# 3, what: arrival

got message of size 168 on Tue Aug  9 21:05:54 2022
RTM_IFINFO: iface status change: len 168, if# 3, link: up, flags:<BROADCAST,RUNNING,SIMPLEX,MULTICAST>

-> ifconfig vtnet0.2 destroy

got message of size 24 on Tue Aug  9 21:05:54 2022
RTM_IFANNOUNCE: interface arrival/departure: len 24, if# 3, what: departure

Reviewed By: glebius
Differential Revision: https://reviews.freebsd.org/D36095
MFC after: 2 weeks

Details

Provenance
melifaroAuthored on Aug 11 2022, 8:09 PM
Reviewer
glebius
Differential Revision
D36095: rtsock: subscribe to ifnet eventhandlers instead of direct calls.
Parents
rG693f88c9da8d: iconv_std: complete the //IGNORE support
Branches
Unknown
Tags
Unknown