From: Roy Marples Date: Sat, 3 Sep 2016 12:23:03 +0000 (+0000) Subject: Remove IPv4 routes in reverse order to match IPv6. X-Git-Tag: v6.11.4~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b7f4be8cbf94210e71fe03dad5cbcda102329e5;p=thirdparty%2Fdhcpcd.git Remove IPv4 routes in reverse order to match IPv6. Thanks to Guy Yur. --- diff --git a/ipv4.c b/ipv4.c index 4d310901..dbe04899 100644 --- a/ipv4.c +++ b/ipv4.c @@ -857,7 +857,7 @@ ipv4_buildroutes(struct dhcpcd_ctx *ctx) /* Remove old routes we used to manage */ if (ctx->ipv4_routes) { - TAILQ_FOREACH(rt, ctx->ipv4_routes, next) { + TAILQ_FOREACH_REVERSE(rt, ctx->ipv4_routes, rt_head, next) { if (find_route(nrs, rt, NULL) == NULL && (rt->iface->options->options & (DHCPCD_EXITING | DHCPCD_PERSISTENT)) !=