From 2d1a6f9c0cc9dfa9e00a7b34541a7c5c3848e6f4 Mon Sep 17 00:00:00 2001 From: twy_2000 Date: Thu, 21 May 2020 12:47:56 +0800 Subject: [PATCH] ubus: filter out global interface --- src/utils/ubus.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils/ubus.c b/src/utils/ubus.c index b65b671..1bde922 100644 --- a/src/utils/ubus.c +++ b/src/utils/ubus.c @@ -1673,6 +1673,8 @@ void subscribe_to_new_interfaces(const char *hostapd_sock_path) { while ((entry = readdir(dirp)) != NULL) { if (entry->d_type == DT_SOCK) { bool do_subscribe = true; + if (strcmp(entry->d_name, "global") == 0) + continue; list_for_each_entry(sub, &hostapd_sock_list, list) { if (strncmp(sub->iface_name, entry->d_name, MAX_INTERFACE_NAME) == 0) {