From a56e14afa612da95cf989b13a84bdb4e93bdcfee Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 4 Nov 2020 12:19:20 +0100 Subject: bridge: preserve hotplug ports on vlan update if config is unchanged Fixes cleanup of port state Signed-off-by: Felix Fietkau --- bridge.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3