diff options
author | Vlad Yasevich <vyasevic@redhat.com> | 2013-02-13 13:00:20 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-02-14 01:42:16 +0100 |
commit | 35e03f3a0275a1ba57e432d7c948cf6f70fbb37a (patch) | |
tree | 7a86834908791e180aaf4284cd462bb7e8a1d926 /net/bridge/br_netlink.c | |
parent | bridge: Add vlan support for local fdb entries (diff) | |
download | linux-35e03f3a0275a1ba57e432d7c948cf6f70fbb37a.tar.xz linux-35e03f3a0275a1ba57e432d7c948cf6f70fbb37a.zip |
bridge: Separate egress policy bitmap
Add an ability to configure a separate "untagged" egress
policy to the VLAN information of the bridge. This superseeds PVID
policy and makes PVID ingress-only. The policy is configured with a
new flag and is represented as a port bitmap per vlan. Egress frames
with a VLAN id in "untagged" policy bitmap would egress
the port without VLAN header.
Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_netlink.c')
-rw-r--r-- | net/bridge/br_netlink.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c index e044cc0b5650..d1dda476d743 100644 --- a/net/bridge/br_netlink.c +++ b/net/bridge/br_netlink.c @@ -143,6 +143,10 @@ static int br_fill_ifinfo(struct sk_buff *skb, vinfo.flags = 0; if (vid == pvid) vinfo.flags |= BRIDGE_VLAN_INFO_PVID; + + if (test_bit(vid, pv->untagged_bitmap)) + vinfo.flags |= BRIDGE_VLAN_INFO_UNTAGGED; + if (nla_put(skb, IFLA_BRIDGE_VLAN_INFO, sizeof(vinfo), &vinfo)) goto nla_put_failure; |