bridge: Take per-{Port, VLAN} neighbor suppression into account
The bridge driver gates the neighbor suppression code behind an internal per-bridge flag called 'BROPT_NEIGH_SUPPRESS_ENABLED'. The flag is set when at least one bridge port has neighbor suppression enabled. As a preparation for per-{Port, VLAN} neighbor suppression, make sure the global flag is also set if per-{Port, VLAN} neighbor suppression is enabled. That is, when the 'BR_NEIGH_VLAN_SUPPRESS' flag is set on at least one bridge port. Signed-off-by: Ido Schimmel <idosch@nvidia.com> Acked-by: Nikolay Aleksandrov <razor@blackwall.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a714e3ec23
commit
6be42ed0a5
@ -30,7 +30,7 @@ void br_recalculate_neigh_suppress_enabled(struct net_bridge *br)
|
|||||||
bool neigh_suppress = false;
|
bool neigh_suppress = false;
|
||||||
|
|
||||||
list_for_each_entry(p, &br->port_list, list) {
|
list_for_each_entry(p, &br->port_list, list) {
|
||||||
if (p->flags & BR_NEIGH_SUPPRESS) {
|
if (p->flags & (BR_NEIGH_SUPPRESS | BR_NEIGH_VLAN_SUPPRESS)) {
|
||||||
neigh_suppress = true;
|
neigh_suppress = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -759,7 +759,7 @@ void br_port_flags_change(struct net_bridge_port *p, unsigned long mask)
|
|||||||
if (mask & BR_AUTO_MASK)
|
if (mask & BR_AUTO_MASK)
|
||||||
nbp_update_port_count(br);
|
nbp_update_port_count(br);
|
||||||
|
|
||||||
if (mask & BR_NEIGH_SUPPRESS)
|
if (mask & (BR_NEIGH_SUPPRESS | BR_NEIGH_VLAN_SUPPRESS))
|
||||||
br_recalculate_neigh_suppress_enabled(br);
|
br_recalculate_neigh_suppress_enabled(br);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user