]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Test actual gateway given rather than one from a random variable.
authorRoy Marples <roy@marples.name>
Sun, 15 Jan 2017 13:33:38 +0000 (13:33 +0000)
committerRoy Marples <roy@marples.name>
Sun, 15 Jan 2017 13:33:38 +0000 (13:33 +0000)
Fixes [19f99593d5].

dhcp.c

diff --git a/dhcp.c b/dhcp.c
index 9e7e5a078afda76b929858785c453c8579d5f406..f2ee50442c4152fca9bb46a76dcfdaa9ffff0aec 100644 (file)
--- a/dhcp.c
+++ b/dhcp.c
@@ -630,7 +630,7 @@ get_option_routes(struct rt_head *routes, struct interface *ifp,
                        p += 4;
                        /* RFC 2131 Section 5.8 states default route is
                         * illegal */
-                       if (sa_is_unspecified(&rt->rt_dest))
+                       if (gateway.s_addr == INADDR_ANY)
                                continue;
                        if ((rt = rt_new(ifp)) == NULL)
                                return -1;