net: dsa: lan9303: Fix lan9303_alr_del_port()

Fix embarrassing bug in lan9303_alr_del_port(): Instead of zeroing
entr->mac_addr, I destroyed the next cache entry. Affected .port_fdb_del and
.port_mdb_del.

Fixes: 0620427ea0 ("net: dsa: lan9303: Add fdb/mdb manipulation")
Signed-off-by: Egil Hjelmeland <privat@egil-hjelmeland.no>
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Egil Hjelmeland 2017-11-08 11:44:36 +01:00 committed by David S. Miller
parent fdae5f37a8
commit 30482e4e28
1 changed files with 1 additions and 1 deletions

View File

@ -719,7 +719,7 @@ static int lan9303_alr_del_port(struct lan9303 *chip, const u8 *mac, int port)
entr->port_map &= ~BIT(port);
if (entr->port_map == 0) /* zero means its free again */
eth_zero_addr(&entr->port_map);
eth_zero_addr(entr->mac_addr);
lan9303_alr_set_entry(chip, mac, entr->port_map, entr->stp_override);
return 0;