summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2012-11-14 10:14:13 +0000
committerRoy Marples <roy@marples.name>2012-11-14 10:14:13 +0000
commite1865b4e14c8d53a89efb1a0883e7bd73d16a8c4 (patch)
treeee0456e077c202a6e42df68bfa3e658c1479cadc
parent7b44e21ed573346cea850ed59cdbfdd74ddaaf00 (diff)
downloaddhcpcd-e1865b4e14c8d53a89efb1a0883e7bd73d16a8c4.tar.xz
Fix compile fr systems without RTF_CLONING such as FreeBSD-8
-rw-r--r--if-bsd.c4
1 files changed, 3 insertions, 1 deletions
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);