diff options
author | Petr Machata <petrm@mellanox.com> | 2018-05-10 12:13:03 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-05-10 23:50:51 +0200 |
commit | 2b18d79e733fd727378aea7927536fb270c7ccbc (patch) | |
tree | 2dfb468c2e62fe8ab26b2c7105b9928ae195c3cb /net/bridge | |
parent | tcp: Add mark for TIMEWAIT sockets (diff) | |
download | linux-2b18d79e733fd727378aea7927536fb270c7ccbc.tar.xz linux-2b18d79e733fd727378aea7927536fb270c7ccbc.zip |
net: bridge: Allow bridge master in br_vlan_get_info()
Mirroring offload in mlxsw needs to check that a given VLAN is allowed
to ingress the bridge device. br_vlan_get_info() is the function that is
used for this, however currently it only supports bridge port devices.
Extend it to support bridge masters as well.
Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br_vlan.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c index df37a5137c25..dc832c0934c6 100644 --- a/net/bridge/br_vlan.c +++ b/net/bridge/br_vlan.c @@ -1176,6 +1176,8 @@ int br_vlan_get_info(const struct net_device *dev, u16 vid, p = br_port_get_check_rtnl(dev); if (p) vg = nbp_vlan_group(p); + else if (netif_is_bridge_master(dev)) + vg = br_vlan_group(netdev_priv(dev)); else return -EINVAL; |