From: Felix Fietkau Date: Wed, 7 Mar 2018 22:14:57 +0000 (+0100) Subject: ip: do not add local routes for host dependencies X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1f5a29c3de6e;p=oweals%2Fnetifd.git 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 --- 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);