summaryrefslogtreecommitdiff
path: root/bridge.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2020-11-04 12:19:20 +0100
committerFelix Fietkau <nbd@nbd.name>2020-11-05 12:03:49 +0100
commita56e14afa612da95cf989b13a84bdb4e93bdcfee (patch)
tree59e4ca3d724ba508a56c594c3057c626e6377fb5 /bridge.c
parentdd5e611536362f3017e1344aebb5891321326413 (diff)
downloadnetifd-a56e14afa612da95cf989b13a84bdb4e93bdcfee.tar.gz
bridge: preserve hotplug ports on vlan update if config is unchanged
Fixes cleanup of port state Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'bridge.c')
-rw-r--r--bridge.c4
1 files changed, 3 insertions, 1 deletions
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);