bird/sysdep
Ondrej Zajicek (work) a39cd2cc0b BSD: Assume onlink flag on ifaces with only host addresses
The BSD kernel does not support the onlink flag and BIRD does not use
direct routes for next hop validation, instead depends on interface
address ranges. We would like to handle PtMP cases with only host
addresses configured, like:

  ifconfig wg0 192.168.0.10/32
  route add 192.168.0.4 -iface wg0
  route add 192.168.0.8 -iface wg0

To accept BIRD routes with onlink next-hop, like:

  route 192.168.42.0/24 via 192.168.0.4%wg0 onlink

BIRD would dismiss the route when receiving from the kernel, as the
next-hop 192.168.0.4 is not part of any interface subnet and onlink
flag is not kept by the BSD kernel.

The commit fixes this by assuming that for routes received from the
kernel, any next-hop is onlink on ifaces with only host addresses.

Thanks to Stefan Haller for the original patch.
2021-12-27 21:00:04 +01:00
..
bsd BSD: Assume onlink flag on ifaces with only host addresses 2021-12-27 21:00:04 +01:00
cf BSD: Use MSG_DONTROUTE for unicast packets on FreeBSD 2018-07-28 16:54:06 +02:00
linux Netlink: Ignore dead routes 2021-01-14 02:01:07 +01:00
unix Directly mapped pages are kept for future use if temporarily not needed 2021-11-24 19:42:52 +00:00
config.h NEWS and version update 2021-03-18 20:18:38 +01:00
Doc Doc: Rename code documentation files back to Doc 2018-12-14 02:03:42 +01:00
sysdep.sgml Spelling fixes to progdoc. 2000-06-07 12:29:08 +00:00