diff options
author | David S. Miller <davem@davemloft.net> | 2015-02-09 14:35:57 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-02-09 14:35:57 -0800 |
commit | 2573beec56aa28a0e6d4430fb6796d0c76308bcf (patch) | |
tree | 15c902551b78a954d5138304b97a16a4d9968202 /net/bridge | |
parent | fd3137cd33ae5590c45c81e9a46fe53b6ab5f66e (diff) | |
parent | 531c94a9681b8c253fd0490a4ca8bbe01a38c78b (diff) | |
download | op-kernel-dev-2573beec56aa28a0e6d4430fb6796d0c76308bcf.zip op-kernel-dev-2573beec56aa28a0e6d4430fb6796d0c76308bcf.tar.gz |
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')
-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 08bf04b..e0670d7 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); } |