wireless: Call wireless_interface_handle_link before deleting the vif
authorHans Dedecker <dedeckeh@gmail.com>
Tue, 25 Oct 2016 09:08:34 +0000 (11:08 +0200)
committerFelix Fietkau <nbd@nbd.name>
Fri, 4 Nov 2016 12:24:02 +0000 (13:24 +0100)
Similar as when updating a vif; call wireless_interface_handle_link removing the vif from
the network when deleting a vif

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
wireless.c

index 9109ce199cb38ad6456a916d3ff244e56377042b..387f4baf709b6242fe8f0100daf49e3c7c75b94f 100644 (file)
@@ -613,6 +613,7 @@ vif_update(struct vlist_tree *tree, struct vlist_node *node_new,
                wireless_interface_init_config(vif_new);
        } else if (vif_old) {
                D(WIRELESS, "Delete wireless interface %s on device %s\n", vif_old->name, wdev->name);
+               wireless_interface_handle_link(vif_old, false);
                free((void *) vif_old->section);
                free(vif_old->config);
                free(vif_old);