diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2022-02-15 19:02:10 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-02-16 11:21:04 +0000 |
commit | cab2cd77005187828273adfec04f3ad18a63cb3d (patch) | |
tree | 086a66e913c60dfe577c550923f672d931d58d05 /net/switchdev/switchdev.c | |
parent | 3116ad0696dd2bf3f53c672f44f77e0d1c2da8ca (diff) | |
download | linux-cab2cd77005187828273adfec04f3ad18a63cb3d.tar.gz linux-cab2cd77005187828273adfec04f3ad18a63cb3d.tar.bz2 linux-cab2cd77005187828273adfec04f3ad18a63cb3d.zip |
net: bridge: vlan: make __vlan_add_flags react only to PVID and UNTAGGED
Currently there is a very subtle aspect to the behavior of
__vlan_add_flags(): it changes the struct net_bridge_vlan flags and
pvid, yet it returns true ("changed") even if none of those changed,
just a transition of br_vlan_is_brentry(v) took place from false to
true.
This can be seen in br_vlan_add_existing(), however we do not actually
rely on this subtle behavior, since the "if" condition that checks that
the vlan wasn't a brentry before had a useless (until now) assignment:
*changed = true;
Make things more obvious by actually making __vlan_add_flags() do what's
written on the box, and be more specific about what is actually written
on the box. This is needed because further transformations will be done
to __vlan_add_flags().
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Acked-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions