Send an IFP to distinguish (default) routes over different interfaces
authorflorian <florian@openbsd.org>
Sat, 23 Jul 2022 09:29:20 +0000 (09:29 +0000)
committerflorian <florian@openbsd.org>
Sat, 23 Jul 2022 09:29:20 +0000 (09:29 +0000)
commit5a55e5184647d9b03e8d34dccd7a4e1613508cac
tree4cf8aadcf791d63923a2a71e011fc643c043c44f
parentbf180fcc3d7ff0508ba5f2864d64d1ee65b7cfbc
Send an IFP to distinguish (default) routes over different interfaces
to the same gateway.

Unfortunately this doesn't help with deleting the correct route when
issuing ifconfig inet -autoconf, the kernel always deletes the first
route. This is the one with the lowest priority if the routes have
different priorities.

What does work is identifying routes by priority but dhcpleased(8)
doesn't set the priority so that the kernel choses the right one
when adding a route and it doesn't yet track the priority the
kernel set.

Another issue is that we might end up with routes having the same
gateway and same priority pointing out of different interfaces. For
example when two ethernet interfaces are set to autoconf and they are
connected to the layer 2 network. This seems like a bad idea but it is
something that could be configured.

Problem reported by mbuhl, claudio suggested to try to send an IFP.

Even though it doesn't work, it seems worthwhile to send the IFP for
when the kernel gains the ability to distinguish routes by IFP.
sbin/dhcpleased/dhcpleased.c