]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix crash when handling routes on interfaces we don't know about.
authorRoy Marples <roy@marples.name>
Wed, 4 Mar 2015 20:16:16 +0000 (20:16 +0000)
committerRoy Marples <roy@marples.name>
Wed, 4 Mar 2015 20:16:16 +0000 (20:16 +0000)
ipv4.c

diff --git a/ipv4.c b/ipv4.c
index de7e1e4a6ccfb56d94ed887f325619c9ef6ad07c..62cc60f5f60d8d47ec1776ae594c187c8e39c635 100644 (file)
--- 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;