summaryrefslogtreecommitdiff
path: root/wireless.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2021-07-23 11:37:57 +0200
committerFelix Fietkau <nbd@nbd.name>2021-07-23 11:38:00 +0200
commit17e453bd68b41780b6564dafa8358efc29a00930 (patch)
tree8c1b2587cdcb56ed97bc83b5095a381c70730cd0 /wireless.c
parent85f01c44a950be8518ce5a7d251b5bba219348cf (diff)
downloadnetifd-17e453bd68b41780b6564dafa8358efc29a00930.tar.gz
wireless: add back regular virtual interfaces on hotplug-add events as well
When hostapd does a DFS channel switch, it tears down all vifs except for the primary one, which causes them got get dropped from the device configuration Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'wireless.c')
-rw-r--r--wireless.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/wireless.c b/wireless.c
index 0c4930c..a8fd9dd 100644
--- a/wireless.c
+++ b/wireless.c
@@ -1506,13 +1506,16 @@ void wireless_device_hotplug_event(const char *name, bool add)
int len;
s = strstr(name, ".sta");
- if (!s)
- return;
+ if (s) {
+ if (strchr(s + 4, '.'))
+ return;
- if (strchr(s + 4, '.'))
+ len = s - name;
+ } else if (!device_find(name)) {
+ len = strlen(name);
+ } else {
return;
-
- len = s - name;
+ }
vlist_for_each_element(&wireless_devices, wdev, node) {
vlist_for_each_element(&wdev->interfaces, vif, node) {