diff options
author | Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp> | 2013-11-13 09:26:13 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-11-14 22:16:34 +0100 |
commit | dbbaf949bcd0ffb8b17cf0438060d55d6cfb8a4b (patch) | |
tree | 3d2e06f417cd6e2e118516f2a6867eaf358a7a73 /net | |
parent | bridge: Use vlan_vid_[add/del] instead of direct ndo_vlan_rx_[add/kill]_vid c... (diff) | |
download | linux-dbbaf949bcd0ffb8b17cf0438060d55d6cfb8a4b.tar.xz linux-dbbaf949bcd0ffb8b17cf0438060d55d6cfb8a4b.zip |
bridge: Call vlan_vid_del for all vids at nbp_vlan_flush
We should call vlan_vid_del for all vids at nbp_vlan_flush to prevent
vid_info->refcount from being leaked when detaching a bridge port.
Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/bridge/br_vlan.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c index 57074be62fcb..af5ebd18d705 100644 --- a/net/bridge/br_vlan.c +++ b/net/bridge/br_vlan.c @@ -390,6 +390,7 @@ int nbp_vlan_delete(struct net_bridge_port *port, u16 vid) void nbp_vlan_flush(struct net_bridge_port *port) { struct net_port_vlans *pv; + u16 vid; ASSERT_RTNL(); @@ -397,6 +398,9 @@ void nbp_vlan_flush(struct net_bridge_port *port) if (!pv) return; + for_each_set_bit(vid, pv->vlan_bitmap, VLAN_N_VID) + vlan_vid_del(port->dev, htons(ETH_P_8021Q), vid); + __vlan_flush(pv); } |