diff options
author | David S. Miller <davem@davemloft.net> | 2015-02-09 17:35:57 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-02-09 17:35:57 -0500 |
commit | 2573beec56aa28a0e6d4430fb6796d0c76308bcf (patch) | |
tree | 15c902551b78a954d5138304b97a16a4d9968202 /net/bridge | |
parent | fd3137cd33ae5590c45c81e9a46fe53b6ab5f66e (diff) | |
parent | 531c94a9681b8c253fd0490a4ca8bbe01a38c78b (diff) |
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 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[], | |||
846 | /* VID was specified, so use it. */ | 846 | /* VID was specified, so use it. */ |
847 | err = __br_fdb_add(ndm, p, addr, nlh_flags, vid); | 847 | err = __br_fdb_add(ndm, p, addr, nlh_flags, vid); |
848 | } else { | 848 | } else { |
849 | if (!pv || bitmap_empty(pv->vlan_bitmap, VLAN_N_VID)) { | 849 | err = __br_fdb_add(ndm, p, addr, nlh_flags, 0); |
850 | err = __br_fdb_add(ndm, p, addr, nlh_flags, 0); | 850 | if (err || !pv) |
851 | goto out; | 851 | goto out; |
852 | } | ||
853 | 852 | ||
854 | /* We have vlans configured on this port and user didn't | 853 | /* We have vlans configured on this port and user didn't |
855 | * specify a VLAN. To be nice, add/update entry for every | 854 | * 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[], | |||
917 | 916 | ||
918 | err = __br_fdb_delete(p, addr, vid); | 917 | err = __br_fdb_delete(p, addr, vid); |
919 | } else { | 918 | } else { |
920 | if (!pv || bitmap_empty(pv->vlan_bitmap, VLAN_N_VID)) { | 919 | err = -ENOENT; |
921 | err = __br_fdb_delete(p, addr, 0); | 920 | err &= __br_fdb_delete(p, addr, 0); |
921 | if (!pv) | ||
922 | goto out; | 922 | goto out; |
923 | } | ||
924 | 923 | ||
925 | /* We have vlans configured on this port and user didn't | 924 | /* We have vlans configured on this port and user didn't |
926 | * specify a VLAN. To be nice, add/update entry for every | 925 | * specify a VLAN. To be nice, add/update entry for every |
927 | * vlan on this port. | 926 | * vlan on this port. |
928 | */ | 927 | */ |
929 | err = -ENOENT; | ||
930 | for_each_set_bit(vid, pv->vlan_bitmap, VLAN_N_VID) { | 928 | for_each_set_bit(vid, pv->vlan_bitmap, VLAN_N_VID) { |
931 | err &= __br_fdb_delete(p, addr, vid); | 929 | err &= __br_fdb_delete(p, addr, vid); |
932 | } | 930 | } |