diff options
| author | Felix Fietkau | 2026-02-26 10:25:53 +0000 |
|---|---|---|
| committer | Felix Fietkau | 2026-02-26 10:25:53 +0000 |
| commit | 69a5afc9713adf31edbf3228a7a372ada7bba449 (patch) | |
| tree | 7b99dadba329cc0d35babc8b333d5fb15e5ab522 | |
| parent | 299a51f0c3011ca98a3f06cd29d50c2e1f86e348 (diff) | |
| download | netifd-master.tar.gz | |
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>
| -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); } |