From: Roy Marples Date: Sun, 15 Jan 2017 13:33:38 +0000 (+0000) Subject: Test actual gateway given rather than one from a random variable. X-Git-Tag: v7.0.0-beta1~86 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b499bacf10d74179052d105a08bdfc891ea38514;p=thirdparty%2Fdhcpcd.git Test actual gateway given rather than one from a random variable. Fixes [19f99593d5]. --- diff --git a/dhcp.c b/dhcp.c index 9e7e5a07..f2ee5044 100644 --- 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;