From 2ff0981bfe1231fc430507b4b5f8031c05005db1 Mon Sep 17 00:00:00 2001 From: Matthew Kobayashi Date: Tue, 22 Apr 2025 12:06:04 +1000 Subject: dhclient: T6253: Respect `no-default-route` --- .../dhclient-enter-hooks.d/06-vyos-nodefaultroute | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/etc/dhcp/dhclient-enter-hooks.d/06-vyos-nodefaultroute (limited to 'src') diff --git a/src/etc/dhcp/dhclient-enter-hooks.d/06-vyos-nodefaultroute b/src/etc/dhcp/dhclient-enter-hooks.d/06-vyos-nodefaultroute new file mode 100644 index 000000000..38f674276 --- /dev/null +++ b/src/etc/dhcp/dhclient-enter-hooks.d/06-vyos-nodefaultroute @@ -0,0 +1,20 @@ +# Don't add default route if no-default-route is configured for interface + +# As configuration is not available to cli-shell-api at the first boot, we must use vyos.config, which contains a workaround for this +function get_no_default_route { +python3 - <