File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -1664,6 +1664,18 @@ static void br_vlan_set_all_vlan_dev_state(struct net_bridge_port *p)
16641664 }
16651665}
16661666
1667+ static void br_vlan_toggle_bridge_binding (struct net_device * br_dev ,
1668+ bool enable )
1669+ {
1670+ struct net_bridge * br = netdev_priv (br_dev );
1671+
1672+ if (enable )
1673+ br_opt_toggle (br , BROPT_VLAN_BRIDGE_BINDING , true);
1674+ else
1675+ br_opt_toggle (br , BROPT_VLAN_BRIDGE_BINDING ,
1676+ br_vlan_has_upper_bind_vlan_dev (br_dev ));
1677+ }
1678+
16671679static void br_vlan_upper_change (struct net_device * dev ,
16681680 struct net_device * upper_dev ,
16691681 bool linking )
@@ -1673,13 +1685,9 @@ static void br_vlan_upper_change(struct net_device *dev,
16731685 if (!br_vlan_is_bind_vlan_dev (upper_dev ))
16741686 return ;
16751687
1676- if (linking ) {
1688+ br_vlan_toggle_bridge_binding (dev , linking );
1689+ if (linking )
16771690 br_vlan_set_vlan_dev_state (br , upper_dev );
1678- br_opt_toggle (br , BROPT_VLAN_BRIDGE_BINDING , true);
1679- } else {
1680- br_opt_toggle (br , BROPT_VLAN_BRIDGE_BINDING ,
1681- br_vlan_has_upper_bind_vlan_dev (dev ));
1682- }
16831691}
16841692
16851693struct br_vlan_link_state_walk_data {
You can’t perform that action at this time.
0 commit comments