summaryrefslogtreecommitdiffstats
path: root/ipv6.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2016-11-08 22:43:13 +0000
committerRoy Marples <roy@marples.name>2016-11-08 22:43:13 +0000
commitcb160638da7b582a9415e864108ed3dca3f5fffb (patch)
tree69a6e42e080efee4834631f850029f9fd2f72122 /ipv6.c
parent6cd92f5a7eb83fd7816868b818be8da45bcd055f (diff)
downloaddhcpcd-cb160638da7b582a9415e864108ed3dca3f5fffb.tar.xz
Reject routes on Linux don't use a gateway.
Diffstat (limited to 'ipv6.c')
-rw-r--r--ipv6.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ipv6.c b/ipv6.c
index 4514bb98..3ed05263 100644
--- a/ipv6.c
+++ b/ipv6.c
@@ -2161,7 +2161,10 @@ inet6_makeprefix(struct interface *ifp, const struct ra *rap,
sa_in6_init(&rt->rt_netmask, &netmask);
if (addr->flags & IPV6_AF_DELEGATEDPFX) {
rt->rt_flags |= RTF_REJECT;
+ /* Linux does not like a gateway for a reject route. */
+#ifndef __linux__
sa_in6_init(&rt->rt_gateway, &in6addr_loopback);
+#endif
} else
rt->rt_gateway.sa_family = AF_UNSPEC;
sa_in6_init(&rt->rt_ifa, &addr->addr);