WSL2-Linux-Kernel/net/bridge
Jonas Gorski 4e777199c0 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: 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>
2024-09-12 11:07:47 +02:00
..
netfilter netfilter: br_netfilter: skip conntrack input hook for promisc packets 2024-04-27 17:05:24 +02:00
Kconfig
Makefile
br.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-08-13 06:41:22 -07:00
br_arp_nd_proxy.c
br_cfm.c bridge: cfm: remove redundant return 2021-06-22 10:35:15 -07:00
br_cfm_netlink.c bridge: cfm: fix enum typo in br_cc_ccm_tx_parse 2024-02-23 08:54:45 +01:00
br_device.c net: bridge: move bridge ioctls out of .ndo_do_ioctl 2021-07-27 20:11:45 +01:00
br_fdb.c net: bridge: br_fdb_external_learn_add(): always set EXT_LEARN 2024-09-12 11:07:47 +02:00
br_forward.c net: bridge: fix corrupted ethernet header on multicast-to-unicast 2024-05-17 11:50:58 +02:00
br_if.c net: bridge: keep ports without IFF_UNICAST_FLT in BR_PROMISC mode 2023-07-23 13:47:29 +02:00
br_input.c netfilter: br_netfilter: skip conntrack input hook for promisc packets 2024-04-27 17:05:24 +02:00
br_ioctl.c net: bridge: fix ioctl old_deviceless bridge argument 2021-12-29 12:28:46 +01:00
br_mdb.c net: bridge: vlan: account for router port lists when notifying 2021-08-17 10:37:29 +01:00
br_mrp.c net: bridge: mrp: Update the Test frames for MRA 2021-06-28 15:46:10 -07:00
br_mrp_netlink.c
br_mrp_switchdev.c
br_multicast.c net: bridge: mcast: wait for previous gc cycles when removing port 2024-08-19 05:45:35 +02:00
br_multicast_eht.c net: bridge: multicast: use multicast contexts instead of bridge or port 2021-07-20 05:41:19 -07:00
br_netfilter_hooks.c netfilter: nf_queue: drop packets with cloned unconfirmed conntracks 2024-09-04 13:23:19 +02:00
br_netfilter_ipv6.c netfilter: br_netfilter: Drop dst references before setting. 2022-09-15 11:30:04 +02:00
br_netlink.c bridge/br_netlink.c: no need to return void function 2024-05-02 16:24:45 +02:00
br_netlink_tunnel.c
br_nf_core.c
br_private.h netfilter: br_netfilter: skip conntrack input hook for promisc packets 2024-04-27 17:05:24 +02:00
br_private_cfm.h
br_private_mcast_eht.h net: bridge: multicast: use multicast contexts instead of bridge or port 2021-07-20 05:41:19 -07:00
br_private_mrp.h net: bridge: mrp: Update the Test frames for MRA 2021-06-28 15:46:10 -07:00
br_private_stp.h
br_private_tunnel.h bridge: always declare tunnel functions 2023-05-24 17:36:52 +01:00
br_stp.c net: bridge: constify variables in the replay helpers 2021-06-28 14:09:03 -07:00
br_stp_bpdu.c
br_stp_if.c bridge: Add extack warning when enabling STP in netns. 2023-07-27 08:46:59 +02:00
br_stp_timer.c
br_switchdev.c net: make switchdev_bridge_port_{,unoffload} loosely coupled with the bridge 2021-08-04 12:35:07 +01:00
br_sysfs_br.c net: bridge: mcast: add and enforce startup query interval minimum 2022-01-05 12:42:37 +01:00
br_sysfs_if.c net: bridge: mcast: br_multicast_set_port_router takes multicast context as argument 2021-08-20 15:00:35 +01:00
br_vlan.c bridge: switchdev: Fix memory leaks when changing VLAN protocol 2022-11-26 09:24:40 +01:00
br_vlan_options.c net: bridge: mcast: add and enforce startup query interval minimum 2022-01-05 12:42:37 +01:00
br_vlan_tunnel.c net: bridge: change return type of br_handle_ingress_vlan_tunnel 2021-08-24 16:51:09 -07:00