Prevent external routes and address being added or deleted when changing
the state of the interface ip settings
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
vlist_for_each_element(&ip->addr, addr, node) {
bool v6 = ((addr->flags & DEVADDR_FAMILY) == DEVADDR_INET6) ? true : false;
+ if (addr->flags & DEVADDR_EXTERNAL)
+ continue;
+
if (addr->enabled == enabled)
continue;
vlist_for_each_element(&ip->route, route, node) {
bool _enabled = enabled;
+ if (route->flags & DEVADDR_EXTERNAL)
+ continue;
+
if (!enable_route(ip, route))
_enabled = false;