]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add KPI that can be used by tunneling interfaces to handle IP addresses
authorae <ae@FreeBSD.org>
Sun, 21 Oct 2018 17:55:26 +0000 (17:55 +0000)
committerae <ae@FreeBSD.org>
Sun, 21 Oct 2018 17:55:26 +0000 (17:55 +0000)
commit09f5d086904e52a0aaafb3d2bfb60fd507d28e09
treeb27d45b3977253546359784b6a7f6649827203d1
parentfdc923eff7e9e3a1adaa27a92235d437a2ad52ec
Add KPI that can be used by tunneling interfaces to handle IP addresses
appearing and disappearing on the host system.

Such handling is need, because tunneling interfaces must use addresses,
that are configured on the host as ingress addresses for tunnels.
Otherwise the system can send spoofed packets with source address, that
belongs to foreign host.

The KPI uses ifaddr_event_ext event to implement addresses tracking.
Tunneling interfaces register event handlers and then they are
notified by the kernel, when an address disappears or appears.

ifaddr_event_compat() handler from if.c replaced by srcaddr_change_event()
in the ip_encap.c

MFC after: 1 month
Sponsored by: Yandex LLC
Differential Revision: https://reviews.freebsd.org/D17134
sys/net/if.c
sys/netinet/ip_encap.c
sys/netinet/ip_encap.h