bridge: Properly check if local fdb entry can be deleted in br_fdb_change_mac_address
bridge: Properly check if local fdb entry can be deleted in br_fdb_change_mac_address

br_fdb_change_mac_address() doesn't check if the local entry has the
same address as any of bridge ports.
Although I'm not sure when it is beneficial, current implementation allow
the bridge device to receive any mac address of its ports.
To preserve this behavior, we have to check if the mac address of the
entry being deleted is identical to that of any port.

As this check is almost the same as that in br_fdb_changeaddr(), create
a common function fdb_delete_local() and call it from
br_fdb_changeadddr() and br_fdb_change_mac_address().

Signed-off-by: Toshiaki Makita <4ba010dc37de3a0b3ddffe053cf94f200b4ff575@lab.ntt.co.jp>
Acked-by: Vlad Yasevich <cbd80080413a7dff621bc5de2d3d61903bde20a2@redhat.com>
Signed-off-by: David S. Miller <fe08d3c717adf2ae63592e4c9aec6e3e404d8e3e@davemloft.net>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs