interface: do not try to bring up an unavailable interface
authorFelix Fietkau <nbd@openwrt.org>
Sun, 31 Aug 2014 13:03:20 +0000 (15:03 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 31 Aug 2014 13:03:20 +0000 (15:03 +0200)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
interface.c

index df04ce317ab946b0953884a101fccde3ac1f0fc9..bebc30be9275ca5f78cd096c2daac8a20c41b1e6 100644 (file)
@@ -277,6 +277,9 @@ interface_check_state(struct interface *iface)
                }
                break;
        case IFS_DOWN:
+               if (!iface->available)
+                       return;
+
                if (iface->autostart && iface->enabled && link_state && !config_init)
                        __interface_set_up(iface);
                break;