From 1f5a29c3de6e3fec5883796ee772e25d56db6a69 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 7 Mar 2018 23:14:57 +0100 Subject: [PATCH] ip: do not add local routes for host dependencies This avoids creating invalid routes in cases where another daemon is handling local routes for an interface, e.g. on mesh interfaces Signed-off-by: Felix Fietkau --- interface-ip.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/interface-ip.c b/interface-ip.c index dcf3390..6ccc03e 100644 --- a/interface-ip.c +++ b/interface-ip.c @@ -262,6 +262,7 @@ interface_ip_add_target_route(union if_addr *addr, bool v6, struct interface *if } } +done: if (!r_next) { free(route); return NULL; @@ -272,8 +273,6 @@ interface_ip_add_target_route(union if_addr *addr, bool v6, struct interface *if route->mtu = r_next->mtu; route->metric = r_next->metric; route->table = r_next->table; - -done: route->iface = iface; if (defaultroute_target) free(route); -- 2.25.1