diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-09-12 11:50:03 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-09-12 11:50:03 +0200 |
commit | 58d2488ffe9553b908d3e10826376adeeb55d67b (patch) | |
tree | 33db179e71bb6b07f2c49452e92ef148a633c918 /interface-ip.c | |
parent | 3bd56db589071948eebd30b00cda7ef1fb38a61b (diff) |
add support for externally managed ip addresses and routes
Diffstat (limited to 'interface-ip.c')
-rw-r--r-- | interface-ip.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/interface-ip.c b/interface-ip.c index e651d39..2e2e9d8 100644 --- a/interface-ip.c +++ b/interface-ip.c @@ -24,13 +24,15 @@ interface_update_proto_addr(struct vlist_tree *tree, if (node_old) { addr = container_of(node_old, struct device_addr, node); - system_del_address(dev, addr); + if (!(addr->flags & DEVADDR_EXTERNAL)) + system_del_address(dev, addr); free(addr); } if (node_new) { addr = container_of(node_new, struct device_addr, node); - system_add_address(dev, addr); + if (!(addr->flags & DEVADDR_EXTERNAL)) + system_add_address(dev, addr); } } @@ -48,13 +50,15 @@ interface_update_proto_route(struct vlist_tree *tree, if (node_old) { route = container_of(node_old, struct device_route, node); - system_del_route(dev, route); + if (!(route->flags & DEVADDR_EXTERNAL)) + system_del_route(dev, route); free(route); } if (node_new) { route = container_of(node_new, struct device_route, node); - system_add_route(dev, route); + if (!(route->flags & DEVADDR_EXTERNAL)) + system_add_route(dev, route); } } |