]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Don't add host routes for the IPv4LL default route.
authorRoy Marples <roy@marples.name>
Fri, 2 Sep 2016 13:37:07 +0000 (13:37 +0000)
committerRoy Marples <roy@marples.name>
Fri, 2 Sep 2016 13:37:07 +0000 (13:37 +0000)
ipv4.c

diff --git a/ipv4.c b/ipv4.c
index 0bd3ceb8f77c47e343721cfff68bfd8bdc3c7811..2115719fafdc59afa608a0fd8a4e1a792eca018d 100644 (file)
--- a/ipv4.c
+++ b/ipv4.c
@@ -661,7 +661,8 @@ add_router_host_route(struct rt_head *rt, const struct interface *ifp)
                return rt;
 
        TAILQ_FOREACH(rtp, rt, next) {
-               if (rtp->dest.s_addr != INADDR_ANY)
+               if (rtp->dest.s_addr != INADDR_ANY ||
+                   rtp->gate.s_addr == INADDR_ANY)
                        continue;
                /* Scan for a route to match */
                TAILQ_FOREACH(rtn, rt, next) {