diff options
| author | Felix Fietkau | 2026-02-26 10:25:53 +0000 |
|---|---|---|
| committer | Felix Fietkau | 2026-02-26 12:08:34 +0000 |
| commit | cbb83a1857407a28a63dc09412a1f209195914ef (patch) | |
| tree | 76488605b3c105e04cd228b2bd8e37676a15df25 | |
| parent | 51fa9ed6d4d6f4e1663d55d3db7e34a964addecb (diff) | |
bridge: skip present toggle in bridge_free_member() when device is activeopenwrt-25.12
When moving a device between bridges during config reload, the present
toggle in bridge_free_member() can disrupt a bridge that has already
successfully claimed the device.
During device_init_pending(), bridges are processed in alphabetical
order. If the new bridge (e.g. br-lan) is processed before the old
bridge (e.g. br-wan), it successfully claims the device. When the old
bridge then flushes the device, the present toggle tears down and
rebuilds the new bridge unnecessarily, causing interface setup failures.
Only toggle the present state when the device has no active claims,
which is the case when bridge_enable_member() failed (e.g. because the
device was still in the old bridge at the time).
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 69a5afc9713adf31edbf3228a7a372ada7bba449)
| -rw-r--r-- | bridge.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -721,7 +721,7 @@ restart: * Ensure that claiming the device is retried by toggling its present * state */ - if (dev->present) { + if (dev->present && !dev->active) { device_set_present(dev, false); device_set_present(dev, true); } |