mirror of
https://github.com/immortalwrt/immortalwrt.git
synced 2025-08-11 06:11:53 +08:00

Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.40 Removed upstreamed patches: generic/pending-6.12/680-net-fix-TCP-UDP-fraglist-GRO.patch generic/pending-6.12/802-nvmem-u-boot-env-align-endianness-of-crc32-values.patch 1- https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.40&id=7c532f222361191fe228e54c5d3e0026fef8a5a0 2- https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.40&id=c29a2328af96338d327cd851803338423c6f07a1 All other patches auto-refreshed. Signed-off-by: Leo Barsky <leobrsky@proton.me> Link: https://github.com/openwrt/openwrt/pull/19514 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
43 lines
1.3 KiB
Diff
43 lines
1.3 KiB
Diff
From: Felix Fietkau <nbd@nbd.name>
|
|
Date: Thu, 22 Aug 2024 18:02:17 +0200
|
|
Subject: [PATCH] net: bridge: fix switchdev host mdb entry updates
|
|
|
|
When a mdb entry is removed, the bridge switchdev code can issue a
|
|
switchdev_port_obj_del call for a port that was not offloaded.
|
|
|
|
This leads to an imbalance in switchdev_port_obj_add/del calls, since
|
|
br_switchdev_mdb_replay has not been called for the port before.
|
|
|
|
This can lead to potential multicast forwarding issues and messages such as:
|
|
mt7915e 0000:01:00.0 wl1-ap0: Failed to del Host Multicast Database entry
|
|
(object id=3) with error: -ENOENT (-2).
|
|
|
|
Fix this issue by checking the port offload status when iterating over
|
|
lower devs.
|
|
|
|
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
---
|
|
|
|
--- a/net/bridge/br_switchdev.c
|
|
+++ b/net/bridge/br_switchdev.c
|
|
@@ -571,10 +571,18 @@ static void br_switchdev_host_mdb(struct
|
|
struct net_bridge_mdb_entry *mp, int type)
|
|
{
|
|
struct net_device *lower_dev;
|
|
+ struct net_bridge_port *port;
|
|
struct list_head *iter;
|
|
|
|
- netdev_for_each_lower_dev(dev, lower_dev, iter)
|
|
+ rcu_read_lock();
|
|
+ netdev_for_each_lower_dev(dev, lower_dev, iter) {
|
|
+ port = br_port_get_rcu(lower_dev);
|
|
+ if (!port || !port->offload_count)
|
|
+ continue;
|
|
+
|
|
br_switchdev_host_mdb_one(dev, lower_dev, mp, type);
|
|
+ }
|
|
+ rcu_read_unlock();
|
|
}
|
|
|
|
static int
|