handle the interface autostart option
authorFelix Fietkau <nbd@openwrt.org>
Wed, 7 Sep 2011 04:34:51 +0000 (06:34 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 7 Sep 2011 04:34:51 +0000 (06:34 +0200)
interface.c

index d8f7de3c3f4910ddfe5a62a9680e0fd284dd01d7..387d3491dc602118f7c761e5563810a12c59e253 100644 (file)
@@ -238,6 +238,11 @@ interface_alloc(const char *name, struct blob_attr *attr)
                        device_add_user(&iface->main_dev, dev);
        }
 
+       if ((cur = tb[IFACE_ATTR_AUTO]))
+               iface->autostart = blobmsg_get_bool(cur);
+       else
+               iface->autostart = true;
+
        netifd_ubus_add_interface(iface);
        config_set_state(&iface->config, attr);