]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
rtsock: subscribe to ifnet eventhandlers instead of direct calls.
authorAlexander V. Chernikov <melifaro@FreeBSD.org>
Thu, 11 Aug 2022 20:09:45 +0000 (20:09 +0000)
committerAlexander V. Chernikov <melifaro@FreeBSD.org>
Thu, 11 Aug 2022 20:36:59 +0000 (20:36 +0000)
commitd8b42ddcac5cb86af679968d09c45c9a7cc3e4fb
treed2dfcd3db5bbf6b872c011f299f9c0f4691d9fe2
parent693f88c9da8dccf173b40fd57d1d15504a54e9b4
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
sys/net/if.c
sys/net/route.h
sys/net/rtsock.c