bridge: make br_fdb_delete also check if the port matches
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Tue, 9 Jun 2015 10:34:13 +0000 (03:34 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Jun 2015 04:58:13 +0000 (21:58 -0700)
Before this patch the user-specified bridge port was ignored when
deleting an fdb entry and thus one could delete an entry that belonged
to any port.
Example (eth0 and eth1 are br0 ports):
bridge fdb add 00:11:22:33:44:55 dev eth0 master
bridge fdb del 00:11:22:33:44:55 dev eth1 master
(succeeds)

after the patch:
bridge fdb add 00:11:22:33:44:55 dev eth0 master
bridge fdb del 00:11:22:33:44:55 dev eth1 master
RTNETLINK answers: No such file or directory

Based on a patch by Wilson Kok.

Reported-by: Wilson Kok <wkok@cumulusnetworks.com>
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_fdb.c

Simple merge