changeset 2986:00521ee7fdd2 draft

Fix crash when handling routes on interfaces we don't know about.
author Roy Marples <roy@marples.name>
date Wed, 04 Mar 2015 20:16:16 +0000
parents 0302782e1082
children 27cf600b8fed
files ipv4.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ipv4.c	Wed Mar 04 20:03:22 2015 +0000
+++ b/ipv4.c	Wed Mar 04 20:16:16 2015 +0000
@@ -388,9 +388,9 @@
 		}
 
 		/* 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;