From e1865b4e14c8d53a89efb1a0883e7bd73d16a8c4 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Wed, 14 Nov 2012 10:14:13 +0000 Subject: [PATCH] Fix compile fr systems without RTF_CLONING such as FreeBSD-8 --- if-bsd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.47.2