aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/br_vlan.c
diff options
context:
space:
mode:
authorVlad Yasevich <vyasevic@redhat.com>2013-02-13 07:00:13 -0500
committerDavid S. Miller <davem@davemloft.net>2013-02-13 19:41:46 -0500
commit6cbdceeb1cb12c7d620161925a8c3e81daadb2e4 (patch)
tree81852fee23a380456cce4d2c1bb5ec52c7ff0013 /net/bridge/br_vlan.c
parent407af3299ef1ac7e87ce3fb530e32a009d1a9efd (diff)
bridge: Dump vlan information from a bridge port
Using the RTM_GETLINK dump the vlan filter list of a given bridge port. The information depends on setting the filter flag similar to how nic VF info is dumped. Signed-off-by: Vlad Yasevich <vyasevic@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_vlan.c')
-rw-r--r--net/bridge/br_vlan.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c
index d8690bfe63d4..f2bf5a197ea3 100644
--- a/net/bridge/br_vlan.c
+++ b/net/bridge/br_vlan.c
@@ -28,6 +28,7 @@ static int __vlan_add(struct net_port_vlans *v, u16 vid)
28 } 28 }
29 29
30 set_bit(vid, v->vlan_bitmap); 30 set_bit(vid, v->vlan_bitmap);
31 v->num_vlans++;
31 return 0; 32 return 0;
32} 33}
33 34
@@ -44,6 +45,7 @@ static int __vlan_del(struct net_port_vlans *v, u16 vid)
44 } 45 }
45 46
46 clear_bit(vid, v->vlan_bitmap); 47 clear_bit(vid, v->vlan_bitmap);
48 v->num_vlans--;
47 if (bitmap_empty(v->vlan_bitmap, BR_VLAN_BITMAP_LEN)) { 49 if (bitmap_empty(v->vlan_bitmap, BR_VLAN_BITMAP_LEN)) {
48 if (v->port_idx) 50 if (v->port_idx)
49 rcu_assign_pointer(v->parent.port->vlan_info, NULL); 51 rcu_assign_pointer(v->parent.port->vlan_info, NULL);