summaryrefslogtreecommitdiff
path: root/interface.c
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2015-06-08 13:02:00 +0200
committerSteven Barth <steven@midlink.org>2015-06-08 13:02:00 +0200
commit8795f9ef89626cd658f615c78c6a17e990c0dcaa (patch)
treed28c7efea73b90a2d92a3212940e14453aed7a22 /interface.c
parent3653d721dad44c5a63790a3fd67e819dfb1dc428 (diff)
downloadnetifd-8795f9ef89626cd658f615c78c6a17e990c0dcaa.tar.gz
Fix removal of dynamic interfaces
Also remove obsolete "del_dynamic" call (use "down" instead) Signed-off-by: Steven Barth <steven@midlink.org>
Diffstat (limited to 'interface.c')
-rw-r--r--interface.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/interface.c b/interface.c
index 5166c0c..848990e 100644
--- a/interface.c
+++ b/interface.c
@@ -74,6 +74,9 @@ const struct uci_blob_param_list interface_attr_list = {
};
static void
+set_config_state(struct interface *iface, enum interface_config_state s);
+
+static void
interface_error_flush(struct interface *iface)
{
struct interface_error *error, *tmp;
@@ -256,9 +259,6 @@ __interface_set_down(struct interface *iface, bool force)
interface_proto_event(iface->proto, PROTO_CMD_TEARDOWN, force);
if (force)
interface_flush_state(iface);
-
- if (iface->dynamic)
- vlist_delete(&interfaces, &iface->node);
break;
case IFS_DOWN:
@@ -644,6 +644,8 @@ interface_handle_config_change(struct interface *iface)
}
if (iface->autostart && iface->available)
interface_set_up(iface);
+ else if (iface->dynamic)
+ set_config_state(iface, IFC_REMOVE);
}
static void