From 1748e1eff7db459bfcaa69b28862dd2740fe1745 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sat, 10 Oct 2026 22:10:32 +0200 Subject: frrender: T9454: render FRR after a DHCP lease only once the commit completed A lease event during a commit rendered FRR from the active configuration, which the commit has not replaced yet. When the lease arrived after the commit's own FRR render but before the commit finished, the stale render was applied and nothing corrected it: moving a DHCP interface into a VRF left the VRF without its default route. The lease hook now starts the render detached and the render waits for the running commit to complete. Detaching is required, as a commit stopping the DHCP client waits for the release hook. Waiting is opt-in, as the commit itself uses the same helper when it cannot reach the configuration daemon. --- .../dhcp/dhclient-exit-hooks.d/98-vyos-static-routes-dhclient-hook | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/etc') diff --git a/src/etc/dhcp/dhclient-exit-hooks.d/98-vyos-static-routes-dhclient-hook b/src/etc/dhcp/dhclient-exit-hooks.d/98-vyos-static-routes-dhclient-hook index 2c895ffd6..7c432d46c 100755 --- a/src/etc/dhcp/dhclient-exit-hooks.d/98-vyos-static-routes-dhclient-hook +++ b/src/etc/dhcp/dhclient-exit-hooks.d/98-vyos-static-routes-dhclient-hook @@ -34,5 +34,7 @@ elif [ "$reason" != "BOUND" ] && [ "$reason" != "EXPIRE" ] && [ "$reason" != "RE return 0 fi -# Reconcile the rendered FRR configuration with the current lease -sudo /usr/libexec/vyos/vyos-frr-render.py +# Reconcile the rendered FRR configuration with the current lease. The render +# waits for a running commit, which may itself wait for this dhclient to stop - +# do not block on it. +sudo systemd-run --no-block --collect --quiet /usr/libexec/vyos/vyos-frr-render.py --after-commit -- cgit v1.2.3