diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-10-27 21:09:47 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-10-27 21:09:47 +0200 |
commit | 24ccfe7d353ceb0ee4f8d4967604585de92fc9d0 (patch) | |
tree | df587c64fb54681c1fb563104134e06f0e751d28 /interface.c | |
parent | 301cf1c6f2c2b155c476e1fb861eeaa19c533222 (diff) |
proto-shell: handle the "available" config flag
Diffstat (limited to 'interface.c')
-rw-r--r-- | interface.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/interface.c b/interface.c index a8f7b8f..787d7d9 100644 --- a/interface.c +++ b/interface.c @@ -184,6 +184,8 @@ interface_claim_device(struct interface *iface) if (dev) device_add_user(&iface->main_dev, dev); } + if (iface->proto_handler->flags & PROTO_FLAG_INIT_AVAILABLE) + interface_set_available(iface, true); } @@ -517,8 +519,8 @@ interface_update(struct vlist_tree *tree, struct vlist_node *node_new, set_config_state(if_old, IFC_REMOVE); } else if (node_new) { D(INTERFACE, "Create interface '%s'\n", if_new->name); - interface_claim_device(if_new); proto_init_interface(if_new, if_new->config); + interface_claim_device(if_new); netifd_ubus_add_interface(if_new); } } |