summaryrefslogtreecommitdiff
path: root/system-linux.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2020-11-23 12:11:42 +0100
committerFelix Fietkau <nbd@nbd.name>2020-11-23 12:48:53 +0100
commit213748a9bcd9683778250e3673b70acdcc8d96a2 (patch)
tree06e8c37b6782166cbcd58d939de4af8ce1f3cc96 /system-linux.c
parent4544f026bb0996adb6d95224031f0ba35cb8c046 (diff)
downloadnetifd-213748a9bcd9683778250e3673b70acdcc8d96a2.tar.gz
system-linux: implement full device present state management for force-external devices
We need to detect when devices are present, because they can be created asynchronously by hostapd after they have already been added by the wifi setup script Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'system-linux.c')
-rw-r--r--system-linux.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/system-linux.c b/system-linux.c
index 78455ae..7ca4c8b 100644
--- a/system-linux.c
+++ b/system-linux.c
@@ -597,7 +597,7 @@ static int cb_rtnl_event(struct nl_msg *msg, void *arg)
if (!system_get_dev_sysctl("/sys/class/net/%s/carrier", dev->ifname, buf, sizeof(buf)))
link_state = strtoul(buf, NULL, 0);
- if (dev->type == &simple_device_type && !system_if_force_external(dev->ifname))
+ if (dev->type == &simple_device_type)
device_set_present(dev, true);
device_set_link(dev, link_state ? true : false);
@@ -679,9 +679,6 @@ found:
if (dev->type != &simple_device_type)
return;
- if (add && system_if_force_external(dev->ifname))
- return;
-
device_set_present(dev, add);
}