From: Roy Marples Date: Fri, 30 Nov 2018 03:50:23 +0000 (+0000) Subject: BSD: Always set RTA_IFP for routes X-Git-Tag: v7.1.0~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25ec9a55cb926e50a8b1b82f90794a06280ca676;p=thirdparty%2Fdhcpcd.git BSD: Always set RTA_IFP for routes Unless we are OpenBSD adding INET6 routes without a gateway. this should work, but doesn't. No biggie as no OS currently supports sharing IPv6 addresses on more than one interface. --- diff --git a/src/if-bsd.c b/src/if-bsd.c index bab674ab..9ac6d599 100644 --- a/src/if-bsd.c +++ b/src/if-bsd.c @@ -514,8 +514,10 @@ if_route(unsigned char cmd, const struct rt *rt) !sa_is_loopback(&rt->rt_gateway)) { rtm->rtm_index = (unsigned short)rt->rt_ifp->index; - if (!gateway_unspec) - rtm->rtm_addrs |= RTA_IFP; +#ifdef __OpenBSD__ + if (!gateway_unspec && rt->rt_dest.sa_family==AF_INET6) +#endif + rtm->rtm_addrs |= RTA_IFP; if (!sa_is_unspecified(&rt->rt_ifa)) rtm->rtm_addrs |= RTA_IFA; }