From: Roy Marples Date: Wed, 4 Mar 2015 20:16:16 +0000 (+0000) Subject: Fix crash when handling routes on interfaces we don't know about. X-Git-Tag: v6.8.0~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d07d0ff4486ed8dbc94c1faeb5ba23083f76d772;p=thirdparty%2Fdhcpcd.git Fix crash when handling routes on interfaces we don't know about. --- diff --git a/ipv4.c b/ipv4.c index de7e1e4a..62cc60f5 100644 --- a/ipv4.c +++ b/ipv4.c @@ -388,9 +388,9 @@ ipv4_handlert(struct dhcpcd_ctx *ctx, int cmd, struct rt *rt) } /* If we manage the route, remove it */ - if ((f = find_route(rt->iface->ctx->ipv4_routes, rt, NULL))) { + if ((f = find_route(ctx->ipv4_routes, rt, NULL))) { desc_route("removing", f); - TAILQ_REMOVE(rt->iface->ctx->ipv4_routes, f, next); + TAILQ_REMOVE(ctx->ipv4_routes, f, next); free(f); } break;