Store the IP address of the corresponding ifa in the rt_gateway field
authormpi <mpi@openbsd.org>
Tue, 26 May 2015 12:19:51 +0000 (12:19 +0000)
committermpi <mpi@openbsd.org>
Tue, 26 May 2015 12:19:51 +0000 (12:19 +0000)
commit3ccf3a0f61993a61ae5d28856dfc5b5486a69a81
tree63bb8aac935ed62b8a770b920c30683a4bfc6aca
parent74f5175a14fe3f0c80a4e4261de9f793c1584808
Store the IP address of the corresponding ifa in the rt_gateway field
of RTF_CLONING and RTF_BROASCAST routes to not create MPATH conflicts
when IP address aliases are used.

This change makes it possible to have multiple RTF_CLONING routes with
the same priority.  Note that any of the existing RTF_CLONING route
might be used by the kernel to create a RTF_CLONED route which should
not be a problem with aliases since they are attached to the same ifp.

This unbreak address aliases since the kernel supports multiple connected
routes for a subnet.

Found the hardway by djm@, ok claudio@
sys/net/route.c
sys/netinet/in.c
sys/netinet6/in6.c
sys/netinet6/nd6_rtr.c