From: Roy Marples Date: Wed, 14 Nov 2012 10:14:13 +0000 (+0000) Subject: Fix compile fr systems without RTF_CLONING such as FreeBSD-8 X-Git-Tag: v5.6.3~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1865b4e14c8d53a89efb1a0883e7bd73d16a8c4;p=thirdparty%2Fdhcpcd.git Fix compile fr systems without RTF_CLONING such as FreeBSD-8 --- diff --git a/if-bsd.c b/if-bsd.c index c4765385..1a35ab76 100644 --- a/if-bsd.c +++ b/if-bsd.c @@ -362,15 +362,17 @@ if_route6(const struct rt6 *rt, int action) if (IN6_IS_ADDR_UNSPECIFIED(&rt->dest) && IN6_IS_ADDR_UNSPECIFIED(&rt->net)) rtm.hdr.rtm_flags |= RTF_GATEWAY; +#ifdef RTF_CLONING else rtm.hdr.rtm_flags |= RTF_CLONING; +#endif rtm.hdr.rtm_addrs = RTA_DST | RTA_GATEWAY | RTA_NETMASK; // if (action >= 0) // rtm.hdr.rtm_addrs |= RTA_IFA; ADDADDR(&rt->dest); - if (rtm.hdr.rtm_flags & (RTF_HOST | RTF_CLONING)) { + if (!(rtm.hdr.rtm_flags & RTF_GATEWAY)) { /* Make us a link layer socket for the host gateway */ memset(&su, 0, sizeof(su)); su.sdl.sdl_len = sizeof(struct sockaddr_dl);