From: Roy Marples Date: Thu, 26 Mar 2015 22:25:26 +0000 (+0000) Subject: Fix detecting fake default routes. X-Git-Tag: v6.8.1~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f83a86702adcd1867ac7ec24759223f1a1401dea;p=thirdparty%2Fdhcpcd.git Fix detecting fake default routes. --- diff --git a/ipv4.c b/ipv4.c index 774029dc..19520110 100644 --- a/ipv4.c +++ b/ipv4.c @@ -704,8 +704,10 @@ ipv4_buildroutes(struct dhcpcd_ctx *ctx) free(or); } else { if (state->added & STATE_FAKE) { - if (!ipv4_findrt(ctx, rt, 1)) - continue; + or = ipv4_findrt(ctx, rt, 1); + if (or == NULL || + or->gate.s_addr != rt->gate.s_addr) + continue; } else { if (n_route(rt) != 0) continue;