diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-10-18 20:42:48 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-10-18 20:42:48 +0200 |
commit | 1bf627bb338ffe61e01bf7d6eeda4a6e18ccbeca (patch) | |
tree | a17dd13cf1b98f63e0c216c1e22e58acef78acab /interface.c | |
parent | ab4a8a357bae08a7bb3d835299fe53098dbdfbf7 (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.c | 4 |
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) |