nterface-ip: remove superfluous iface check in interface_ip_set_enabled()
[project/netifd.git] / wireless.c
index be94c34..387f4ba 100644 (file)
@@ -83,7 +83,7 @@ vif_config_add_bridge(struct blob_buf *buf, struct blob_attr *networks, bool pre
                if (!dev)
                        return;
 
-               if (dev->type != &bridge_device_type)
+               if (!dev->type->bridge_capability)
                        return;
        }
 
@@ -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);