device: make link status detection optional for vlan devices
[project/netifd.git] / system-linux.c
index 7955cec..7ae9e27 100644 (file)
@@ -322,7 +322,8 @@ static int cb_rtnl_event(struct nl_msg *msg, void *arg)
                goto out;
 
        device_set_ifindex(dev, ifi->ifi_index);
-       device_set_link(dev, ifi->ifi_flags & IFF_LOWER_UP ? true : false);
+       if (!dev->type->keep_link_status)
+               device_set_link(dev, ifi->ifi_flags & IFF_LOWER_UP ? true : false);
 
 out:
        return 0;