From 61c71fb7a38b1a7d3ed30e7a535bcdeae8d82c35 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Sat, 18 Jul 2020 12:26:34 +0200 Subject: [PATCH] opensync: only update vif state when the vap is up Check of the vap exists before updating it. Reading life data will otherwise fail. Signed-off-by: John Crispin --- .../opensync/src/platform/openwrt/src/lib/target/src/radio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/feeds/wlan-ap/opensync/src/platform/openwrt/src/lib/target/src/radio.c b/feeds/wlan-ap/opensync/src/platform/openwrt/src/lib/target/src/radio.c index 6758e939b..9916af60e 100755 --- a/feeds/wlan-ap/opensync/src/platform/openwrt/src/lib/target/src/radio.c +++ b/feeds/wlan-ap/opensync/src/platform/openwrt/src/lib/target/src/radio.c @@ -278,7 +278,8 @@ static void periodic_task(void *arg) struct uci_section *s = uci_to_section(e); if (!strcmp(s->type, "wifi-iface")) - vif_state_update(s, NULL); + if (vif_find(s->e.name)) + vif_state_update(s, NULL); } uci_unload(uci, wireless); LOGT("periodic: stop state update ");