summaryrefslogtreecommitdiffhomepage
path: root/interface.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-10-18 20:42:48 +0200
committerFelix Fietkau <nbd@openwrt.org>2011-10-18 20:42:48 +0200
commit1bf627bb338ffe61e01bf7d6eeda4a6e18ccbeca (patch)
treea17dd13cf1b98f63e0c216c1e22e58acef78acab /interface.c
parentab4a8a357bae08a7bb3d835299fe53098dbdfbf7 (diff)
on proto event IFPEV_DOWN, do not attempt to bring up interfaces that are no longer available
Diffstat (limited to 'interface.c')
-rw-r--r--interface.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/interface.c b/interface.c
index 7c8a0c2..7837274 100644
--- a/interface.c
+++ b/interface.c
@@ -279,10 +279,10 @@ interface_proto_cb(struct interface_proto_state *state, enum interface_proto_eve
system_flush_routes();
mark_interface_down(iface);
interface_handle_config_change(iface);
- if (iface->autostart)
- __interface_set_up(iface);
if (iface->l3_dev->dev)
device_release(iface->l3_dev);
+ if (iface->autostart && iface->available)
+ __interface_set_up(iface);
break;
case IFPEV_LINK_LOST:
if (iface->state != IFS_UP)