diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-10-19 02:08:25 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-10-19 02:36:45 +0200 |
commit | ccca61c97d460d73f29750abdf38cea20ac440f3 (patch) | |
tree | 8e0c47f21ec7205c54a41811ee17a7aa03fd00eb /interface.c | |
parent | f8276b9b149f3b0c8f3cdf8d3d0c232bd92e3464 (diff) |
rework and fix hotplug interface handling
Diffstat (limited to 'interface.c')
-rw-r--r-- | interface.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/interface.c b/interface.c index f03a7b0..8e42f21 100644 --- a/interface.c +++ b/interface.c @@ -122,7 +122,7 @@ __interface_set_up(struct interface *iface) return 0; } -static void +void __interface_set_down(struct interface *iface, bool force) { interface_clear_errors(iface); @@ -194,7 +194,7 @@ interface_claim_device(struct interface *iface) { struct device *dev; - if (iface->proto_handler && + if (iface->ifname && iface->proto_handler && !(iface->proto_handler->flags & PROTO_FLAG_NODEV)) { dev = device_get(iface->ifname, true); if (dev) @@ -208,6 +208,7 @@ interface_cleanup(struct interface *iface) { struct interface_user *dep, *tmp; + iface->hotplug_dev = false; list_for_each_entry_safe(dep, tmp, &iface->users, list) interface_remove_user(dep); |