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

(cherry picked from commit d8b42ddcac5cb86af679968d09c45c9a7cc3e4fb)

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
rG95b5ff22a93c: netinet6: allow ND entries creation for all directly-reachable
Branches
Unknown
Tags
Unknown