summaryrefslogtreecommitdiffhomepage
path: root/system-linux.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-10-20 22:07:18 +0200
committerFelix Fietkau <nbd@openwrt.org>2014-10-20 22:07:20 +0200
commit5a4eb870afc69e9fa93fdccb8a42f75e8e357f4e (patch)
tree894f3c5937cf1f8941f0121f75c6dc283cce2bec /system-linux.c
parentfd7d5b43d85b2e3bb2eee98644bca833c6202048 (diff)
device: make link status detection optional for vlan devices
Fixes a race condition that triggers endless link loss / detect calls when VLAN devices are created. Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'system-linux.c')
-rw-r--r--system-linux.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/system-linux.c b/system-linux.c
index 7955cec..7ae9e27 100644
--- a/system-linux.c
+++ b/system-linux.c
@@ -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;