kernel_samsung_a53x/net/bridge
Jonas Gorski ea412b366f net: bridge: br_fdb_external_learn_add(): always set EXT_LEARN
[ 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: 710ae7287737 ("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>
2024-11-23 23:21:04 +01:00
..
netfilter netfilter: validate user input for expected length 2024-11-19 09:22:46 +01:00
br.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
br_arp_nd_proxy.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
br_device.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
br_fdb.c net: bridge: br_fdb_external_learn_add(): always set EXT_LEARN 2024-11-23 23:21:04 +01:00
br_forward.c net: bridge: fix multicast-to-unicast with fraglist GSO 2024-11-19 11:32:43 +01:00
br_if.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
br_input.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
br_ioctl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
br_mdb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
br_mrp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
br_mrp_netlink.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
br_mrp_switchdev.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
br_multicast.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
br_netfilter_hooks.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
br_netfilter_ipv6.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
br_netlink.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
br_netlink_tunnel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
br_nf_core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
br_private.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
br_private_mrp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
br_private_stp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
br_private_tunnel.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
br_stp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
br_stp_bpdu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
br_stp_if.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
br_stp_timer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
br_switchdev.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
br_sysfs_br.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
br_sysfs_if.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
br_vlan.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
br_vlan_options.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
br_vlan_tunnel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00