summaryrefslogtreecommitdiff
path: root/interface-definitions/include/interface
diff options
context:
space:
mode:
authorBrad Kollmyer <bradk@vitalsoft.com>2026-08-11 21:30:35 +0200
committerChristian Breunig <christian@breunig.cc>2026-08-11 21:30:35 +0200
commite746ba21878825c1f4837d2c5cf7316ac38e0d2b (patch)
treedbd45466313e1d52260cf9fda2b7dde096fa3438 /interface-definitions/include/interface
parent9502cdffa1c016f35c957a5d61f67b9bbd856cbe (diff)
downloadvyos-1x-e746ba21878825c1f4837d2c5cf7316ac38e0d2b.tar.gz
vyos-1x-e746ba21878825c1f4837d2c5cf7316ac38e0d2b.zip
vyos-netlinkd: T9086: drain netlink during commit to avoid stale link-DOWN
Original bug: while a commit held the lock, the daemon called sleep(1) without reading the netlink socket. The pending message stayed queued in the kernel buffer, so once the commit ended, a stale event (e.g. a DOWN from a disable that had already been re-enabled) got processed as if it were fresh - stopping dhclient on an interface that was actually back UP. The applied fix keeps only the two pieces that are actually load-bearing: 1. Drain instead of sleep - while commit_in_progress2() is true, still call ipr.get() to read and discard any pending netlink messages, so nothing stale survives to be processed after the commit ends. 2. Reconcile on commit end - once the commit finishes, walk all matching interfaces, compare live sysfs operstate against the last state the daemon acted on (_iface_prev_operstate), and run the normal DHCP handler for any that disagree. This catches a real transition that happened only inside the drain window and would otherwise be silently lost. Dropped from the original fix: an unconditional live-sysfs override inside _handle_dhcp_events() that ran on every event, not just around commits - redundant with reconcile, and risked discarding genuine fast link flaps unrelated to any commit. Co-authored-by: Christian Breunig <christian@breunig.cc>
Diffstat (limited to 'interface-definitions/include/interface')
0 files changed, 0 insertions, 0 deletions