on proto event IFPEV_DOWN, do not attempt to bring up interfaces that are no longer...
authorFelix Fietkau <nbd@openwrt.org>
Tue, 18 Oct 2011 18:42:48 +0000 (20:42 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 18 Oct 2011 18:42:48 +0000 (20:42 +0200)
interface.c

index 7c8a0c258eaabdb29d215750501140a08ef52c6a..7837274aefc0473ce64aeaecc91b71d5a171c42c 100644 (file)
@@ -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)