Commit 0f110f7
committed
fix(router): the LAN address ended up on both the bridge and the member
Seen after a reboot with a cable in the LAN port: 192.168.50.1 was on
enp2s0 *and* on br-lan at once — two interfaces answering for one address on
one segment.
NetworkManager re-applies a profile's address the moment it sees it
disappear. The persistent address a LAN port needs — without it there is
nothing for the next apply to read, which is how the first reboot test
failed — is exactly what NM puts straight back after the bridge takes it.
A member is now taken out of NM's hands before the flush, and handed back on
teardown, which is also what restores that persistent address for next time.
The reconcile path needed it too, and did none of it: when the bridge
already existed, `create_lan_bridge` only fixed up membership and returned.
Re-applying settings is precisely when NM has had time to re-address a
member, so that path now does the same address work as a fresh build, and
puts the address back on the bridge if it went missing.
Verified on hardware: after the switch the port holds no address and reads
`unmanaged`, the bridge holds it alone, and a client on the LAN pings out,
fetches over HTTP and pulls 1 MB through NAT unchanged.1 parent 26a45cc commit 0f110f7
2 files changed
Lines changed: 103 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
220 | 241 | | |
221 | 242 | | |
222 | 243 | | |
| |||
262 | 283 | | |
263 | 284 | | |
264 | 285 | | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
265 | 294 | | |
266 | 295 | | |
267 | 296 | | |
268 | 297 | | |
| 298 | + | |
| 299 | + | |
269 | 300 | | |
270 | 301 | | |
271 | 302 | | |
| |||
286 | 317 | | |
287 | 318 | | |
288 | 319 | | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
289 | 325 | | |
290 | 326 | | |
291 | 327 | | |
| |||
343 | 379 | | |
344 | 380 | | |
345 | 381 | | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
346 | 386 | | |
347 | 387 | | |
348 | 388 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2645 | 2645 | | |
2646 | 2646 | | |
2647 | 2647 | | |
| 2648 | + | |
| 2649 | + | |
| 2650 | + | |
| 2651 | + | |
| 2652 | + | |
| 2653 | + | |
| 2654 | + | |
| 2655 | + | |
| 2656 | + | |
| 2657 | + | |
| 2658 | + | |
| 2659 | + | |
| 2660 | + | |
| 2661 | + | |
| 2662 | + | |
| 2663 | + | |
| 2664 | + | |
| 2665 | + | |
| 2666 | + | |
| 2667 | + | |
| 2668 | + | |
| 2669 | + | |
| 2670 | + | |
| 2671 | + | |
| 2672 | + | |
| 2673 | + | |
| 2674 | + | |
| 2675 | + | |
| 2676 | + | |
| 2677 | + | |
| 2678 | + | |
| 2679 | + | |
| 2680 | + | |
| 2681 | + | |
| 2682 | + | |
| 2683 | + | |
| 2684 | + | |
| 2685 | + | |
| 2686 | + | |
| 2687 | + | |
| 2688 | + | |
| 2689 | + | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
| 2693 | + | |
| 2694 | + | |
| 2695 | + | |
| 2696 | + | |
| 2697 | + | |
| 2698 | + | |
| 2699 | + | |
| 2700 | + | |
| 2701 | + | |
| 2702 | + | |
| 2703 | + | |
| 2704 | + | |
| 2705 | + | |
| 2706 | + | |
| 2707 | + | |
| 2708 | + | |
| 2709 | + | |
| 2710 | + | |
0 commit comments