]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
linux: fix adding host routes
authorRoy Marples <roy@marples.name>
Sun, 1 Jul 2018 19:46:03 +0000 (20:46 +0100)
committerRoy Marples <roy@marples.name>
Sun, 1 Jul 2018 19:46:03 +0000 (20:46 +0100)
src/if-linux.c

index 99bacfabec39ce266a232302d0a5198c75559ff7..3196c9df494315cabb2a0db7746f6cfcad021d52 100644 (file)
@@ -1228,7 +1228,7 @@ if_route(unsigned char cmd, const struct rt *rt)
                        nlm.rt.rtm_protocol = RTPROT_BOOT;
                if (rt->rt_ifp->flags & IFF_LOOPBACK)
                        nlm.rt.rtm_scope = RT_SCOPE_HOST;
-               else if (gateway_unspec || sa_is_allones(&rt->rt_netmask))
+               else if (gateway_unspec)
                        nlm.rt.rtm_scope = RT_SCOPE_LINK;
                else
                        nlm.rt.rtm_scope = RT_SCOPE_UNIVERSE;