summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2013-11-19 12:17:02 +0100
committerFelix Fietkau <nbd@openwrt.org>2013-12-08 18:43:51 +0100
commit465efe77b06ce9bab1935395a64f1a441f5f3c89 (patch)
tree5461f71e8aea30965e44d9019fd9c881132b69a7
parent45df0e856445469c8647bfcd89c96872d274ef94 (diff)
netifd: Routing table parameter needs to be checked in route update
Routing table parameter needs to be checked in interface_update_proto_route; a route which has an identical nexthop but a different routing table needs to be deleted and added in the correct routing table. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
-rw-r--r--interface-ip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/interface-ip.c b/interface-ip.c
index 4edae2e..60b446c 100644
--- a/interface-ip.c
+++ b/interface-ip.c
@@ -633,7 +633,8 @@ interface_update_proto_route(struct vlist_tree *tree,
route_new = container_of(node_new, struct device_route, node);
if (node_old && node_new)
- keep = !memcmp(&route_old->nexthop, &route_new->nexthop, sizeof(route_old->nexthop));
+ keep = !memcmp(&route_old->nexthop, &route_new->nexthop, sizeof(route_old->nexthop)) &&
+ (route_old->table == route_new->table);
if (node_old) {
if (!(route_old->flags & DEVADDR_EXTERNAL) && route_old->enabled && !keep)