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 <john@phrozen.org>
This commit is contained in:
John Crispin 2020-07-18 12:26:34 +02:00
parent 0e6ce72ac7
commit 61c71fb7a3

View File

@ -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 ");