]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: Never offload FDB entries on standalone ports
authorTobias Waldekranz <tobias@waldekranz.com>
Tue, 15 Mar 2022 23:30:33 +0000 (00:30 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 17 Mar 2022 02:36:56 +0000 (19:36 -0700)
commit0a7b7321bac34db19c16e6b7ea03a44a3da52147
treea8d25cb127f52cdf4907bd7f65b19a2213cae0cc
parentb8c3b6bdee8d56d1aceee0ce06458d2cc2f7f54b
net: dsa: Never offload FDB entries on standalone ports

If a port joins a bridge that it can't offload, it will fallback to
standalone mode and software bridging. In this case, we never want to
offload any FDB entries to hardware either.

Previously, for host addresses, we would eventually end up in
dsa_port_bridge_host_fdb_add, which would unconditionally dereference
dp->bridge and cause a segfault.

Fixes: aaee17759577 ("net: dsa: request drivers to perform FDB isolation")
Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20220315233033.1468071-1-tobias@waldekranz.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/dsa/slave.c