This is required to maintain the original BSD behavior of locally
configured addresses being always reacheable.
Some interfaces are^w^W^Wem(4) is special and generally has a DOWN
link state when configured by netstart(8). As a result all the
route entries cloned/added before its link state goes to UP are also
marked as DOWN.
Note that this problem was not present when local addresses were
attached to lo0.
ok mikeb@
-/* $OpenBSD: route.c,v 1.249 2015/10/07 10:50:35 mpi Exp $ */
+/* $OpenBSD: route.c,v 1.250 2015/10/13 09:59:37 mpi Exp $ */
/* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */
/*
#ifndef SMALL_KERNEL
/* Check the link state if the table supports it. */
if (rtable_mpath_capable(tableid, ndst->sa_family) &&
+ !ISSET(rt->rt_flags, RTF_LOCAL) &&
(!LINK_STATE_IS_UP(ifa->ifa_ifp->if_link_state) ||
!ISSET(ifa->ifa_ifp->if_flags, IFF_UP))) {
rt->rt_flags &= ~RTF_UP;