summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2018-03-07 23:14:57 +0100
committerFelix Fietkau <nbd@nbd.name>2018-03-07 23:15:12 +0100
commit1f5a29c3de6e3fec5883796ee772e25d56db6a69 (patch)
tree2c40a57a10ecf832e387d31edece9e5cf288d39d
parent8cdb17d2c58d5c3ecb57bdaf1981cd72b4948db1 (diff)
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 <nbd@nbd.name>
-rw-r--r--interface-ip.c3
1 files changed, 1 insertions, 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);