Ubuntu-focal-kernel/net/bridge
Jonas Gorski 286fcc73a7 net: bridge: br_fdb_external_learn_add(): always set EXT_LEARN
BugLink: https://bugs.launchpad.net/bugs/2081278

[ Upstream commit bee2ef946d3184e99077be526567d791c473036f ]

When userspace wants to take over a fdb entry by setting it as
EXTERN_LEARNED, we set both flags BR_FDB_ADDED_BY_EXT_LEARN and
BR_FDB_ADDED_BY_USER in br_fdb_external_learn_add().

If the bridge updates the entry later because its port changed, we clear
the BR_FDB_ADDED_BY_EXT_LEARN flag, but leave the BR_FDB_ADDED_BY_USER
flag set.

If userspace then wants to take over the entry again,
br_fdb_external_learn_add() sees that BR_FDB_ADDED_BY_USER and skips
setting the BR_FDB_ADDED_BY_EXT_LEARN flags, thus silently ignores the
update.

Fix this by always allowing to set BR_FDB_ADDED_BY_EXT_LEARN regardless
if this was a user fdb entry or not.

Fixes: 710ae72877 ("net: bridge: Mark FDB entries that were added by user as such")
Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20240903081958.29951-1-jonas.gorski@bisdn.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Koichiro Den <koichiro.den@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
2024-09-27 10:50:32 +02:00
..
netfilter netfilter: nf_conntrack_bridge: initialize err to 0 2024-02-02 14:13:09 +01:00
Kconfig
Makefile
br.c
br_arp_nd_proxy.c
br_device.c net: bridge: clear bridge's private skb space on xmit 2024-04-26 10:54:07 +02:00
br_fdb.c net: bridge: br_fdb_external_learn_add(): always set EXT_LEARN 2024-09-27 10:50:32 +02:00
br_forward.c net: bridge: fix corrupted ethernet header on multicast-to-unicast 2024-07-05 10:51:53 +02:00
br_if.c net: bridge: keep ports without IFF_UNICAST_FLT in BR_PROMISC mode 2023-10-02 12:12:07 +02:00
br_input.c net: bridge: fdb: convert is_local to bitops 2024-09-27 10:50:32 +02:00
br_ioctl.c
br_mdb.c
br_multicast.c
br_netfilter_hooks.c netfilter: br_netfilter: fix recent physdev match breakage 2023-08-09 12:25:11 +02:00
br_netfilter_ipv6.c netfilter: br_netfilter: Drop dst references before setting. 2022-11-24 10:28:13 +01:00
br_netlink.c
br_netlink_tunnel.c
br_nf_core.c
br_private.h net: bridge: fdb: convert added_by_external_learn to use bitops 2024-09-27 10:50:32 +02:00
br_private_stp.h
br_private_tunnel.h
br_stp.c
br_stp_bpdu.c
br_stp_if.c
br_stp_timer.c
br_switchdev.c net: bridge: fdb: convert added_by_user to bitops 2024-09-27 10:50:32 +02:00
br_sysfs_br.c
br_sysfs_if.c
br_vlan.c
br_vlan_tunnel.c