vlan: reset device state on init
authorFelix Fietkau <nbd@openwrt.org>
Fri, 23 Jan 2015 23:47:13 +0000 (00:47 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 23 Jan 2015 23:47:13 +0000 (00:47 +0100)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
vlan.c

diff --git a/vlan.c b/vlan.c
index 354e12f..7424aa8 100644 (file)
--- a/vlan.c
+++ b/vlan.c
@@ -139,6 +139,9 @@ static struct device *get_vlan_device(struct device *dev, int id, bool create)
        vldev->dep.cb = vlan_dev_cb;
        device_add_user(&vldev->dep, dev);
 
+       vldev->set_state(dev, false);
+       system_vlan_del(dev);
+
        return &vldev->dev;
 }