diff options
| author | Robert Navarro <crshman@gmail.com> | 2026-05-31 13:34:09 -0700 |
|---|---|---|
| committer | Robert Navarro <crshman@gmail.com> | 2026-06-03 10:19:54 -0700 |
| commit | 3649dd09743e47700d36ecd25bffcd77dbb3cc3f (patch) | |
| tree | dc4b580eee974d347ba7a7dcca7fa47e17c46906 /src/migration-scripts/webproxy | |
| parent | 6d0d9e424936671f03df19ee59c94f7aa5c69d3e (diff) | |
| download | vyos-1x-3649dd09743e47700d36ecd25bffcd77dbb3cc3f.tar.gz vyos-1x-3649dd09743e47700d36ecd25bffcd77dbb3cc3f.zip | |
vyos-netlinkd: T8950: track per-interface operstate to suppress UP-to-UP DHCP restarts
_handle_dhcp_events() restarts dhclient/dhcp6c on every RTM_NEWLINK
that carries operstate=UP, regardless of whether the interface was
already UP. Normal kernel events that re-notify UP without a preceding
DOWN (e.g. post-migration gratuitous-ARP, promiscuous-mode toggles)
trigger unnecessary DHCP restarts. Each restart also creates a feedback
loop: dhclient-script runs "ip link set dev <if> up" during PREINIT,
which emits another RTM_NEWLINK(UP), which triggers another restart.
One seed event becomes 10+ restarts in 15 seconds.
Add a module-level dict tracking the last observed operstate per
interface. Only proceed with the DHCP restart when the transition is
DOWN-to-UP or when no previous state is recorded (first boot / service
restart). UP-to-UP re-notifications are suppressed with a LOG_DEBUG
message.
Validated on a production VyOS 2026.05.26-1327-rolling router: a
controlled KVM live migration after the patch produced zero DHCP
restarts (all UP-to-UP events suppressed), with no impact on normal
DOWN-to-UP DHCP recovery.
Diffstat (limited to 'src/migration-scripts/webproxy')
0 files changed, 0 insertions, 0 deletions
