diff options
author | David S. Miller <davem@davemloft.net> | 2015-02-09 23:35:57 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-02-09 23:35:57 +0100 |
commit | 2573beec56aa28a0e6d4430fb6796d0c76308bcf (patch) | |
tree | 15c902551b78a954d5138304b97a16a4d9968202 /net/bridge/br_fdb.c | |
parent | openvswitch: Only set TUNNEL_VXLAN_OPT if VXLAN-GBP metadata is set (diff) | |
parent | tcp: don't include Fast Open option in SYN-ACK on pure SYN-data (diff) | |
download | linux-2573beec56aa28a0e6d4430fb6796d0c76308bcf.tar.xz linux-2573beec56aa28a0e6d4430fb6796d0c76308bcf.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_fdb.c')
-rw-r--r-- | net/bridge/br_fdb.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c index 08bf04bdac58..e0670d7054f9 100644 --- a/net/bridge/br_fdb.c +++ b/net/bridge/br_fdb.c @@ -846,10 +846,9 @@ int br_fdb_add(struct ndmsg *ndm, struct nlattr *tb[], /* VID was specified, so use it. */ err = __br_fdb_add(ndm, p, addr, nlh_flags, vid); } else { - if (!pv || bitmap_empty(pv->vlan_bitmap, VLAN_N_VID)) { - err = __br_fdb_add(ndm, p, addr, nlh_flags, 0); + err = __br_fdb_add(ndm, p, addr, nlh_flags, 0); + if (err || !pv) goto out; - } /* We have vlans configured on this port and user didn't * specify a VLAN. To be nice, add/update entry for every @@ -917,16 +916,15 @@ int br_fdb_delete(struct ndmsg *ndm, struct nlattr *tb[], err = __br_fdb_delete(p, addr, vid); } else { - if (!pv || bitmap_empty(pv->vlan_bitmap, VLAN_N_VID)) { - err = __br_fdb_delete(p, addr, 0); + err = -ENOENT; + err &= __br_fdb_delete(p, addr, 0); + if (!pv) goto out; - } /* We have vlans configured on this port and user didn't * specify a VLAN. To be nice, add/update entry for every * vlan on this port. */ - err = -ENOENT; for_each_set_bit(vid, pv->vlan_bitmap, VLAN_N_VID) { err &= __br_fdb_delete(p, addr, vid); } |