diff options
| author | Christian Breunig <christian@breunig.cc> | 2026-09-04 22:14:45 +0200 |
|---|---|---|
| committer | Christian Breunig <christian@breunig.cc> | 2026-09-04 22:14:45 +0200 |
| commit | 9a7d5b27cd908473b7cd9e16fc0d1bbe7e983d2e (patch) | |
| tree | d055f72a3e7cdd44832f4f5981f654578554f11d /scripts/cli | |
| parent | 16f1cf4579e3c1bf3a2639d54c6ae9e1ef163259 (diff) | |
| download | vyos-1x-9a7d5b27cd908473b7cd9e16fc0d1bbe7e983d2e.tar.gz vyos-1x-9a7d5b27cd908473b7cd9e16fc0d1bbe7e983d2e.zip | |
static: T9278: reconcile FRR config after every DHCP lease event
The default route derived from "interfaces <type> <ifname> address dhcp" is
rendered from the DHCP lease file, so it is only known at lease time. Until now
the sole runtime path into staticd was the one-shot vtysh injection in
dhclient-enter-hooks.d/03-vyos-ipwrapper. That injection races the FRR reload of
the very commit which started the DHCP client: dhclient runs with "-nw", thus the
commit does not wait for a lease, and when BOUND arrives mid-reload frr_alive()
can report FRR as down. The route is then installed into the kernel only and FRR
never learns about it. Nothing recovers afterwards, as FRRender.generate()
short-circuits on an unchanged configuration dict.
The self-healing re-render used by "protocols static route <prefix>
dhcp-interface" was gated on /tmp/static_dhcp_interfaces, which never lists plain
"address dhcp" interfaces - protocols_static.py does not even run on an
interface-only commit, as no config-mode dependency points to it.
Derive the DHCP dependent interface list from the configuration dict itself, both
for the default VRF and for every named VRF, and use it for FRR change
detection. Drop the interface list gate in the dhclient exit hook so any lease
event requests a re-render.
Also poll for the lease and for the rendered route in the affected smoketests
instead of relying on a fixed sleep.
Diffstat (limited to 'scripts/cli')
0 files changed, 0 insertions, 0 deletions
