From: Felix Fietkau Date: Wed, 4 Nov 2020 11:19:20 +0000 (+0100) Subject: bridge: preserve hotplug ports on vlan update if config is unchanged X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a56e14afa612da95cf989b13a84bdb4e93bdcfee;p=project%2Fnetifd.git bridge: preserve hotplug ports on vlan update if config is unchanged Fixes cleanup of port state Signed-off-by: Felix Fietkau --- diff --git a/bridge.c b/bridge.c index cf87408..91036d2 100644 --- a/bridge.c +++ b/bridge.c @@ -1060,8 +1060,10 @@ bridge_vlan_update(struct vlist_tree *tree, struct vlist_node *node_new, if (node_new) vlan_new = container_of(node_new, struct bridge_vlan, node); - if (node_new && node_old && bridge_vlan_equal(vlan_old, vlan_new)) + if (node_new && node_old && bridge_vlan_equal(vlan_old, vlan_new)) { + list_splice_init(&vlan_old->hotplug_ports, &vlan_new->hotplug_ports); goto out; + } if (node_old) bridge_set_vlan_state(bst, vlan_old, false);