From 4b27e6c3165159936b248f6a7bb2229a022b7664 Mon Sep 17 00:00:00 2001 From: Timo Makinen Date: Sat, 12 Oct 2024 19:42:38 +0000 Subject: [PATCH] ifstated: Fix dna-gw config for OpenBSD 7.6 --- roles/ifstated/templates/ifstated-dna.conf.j2 | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/roles/ifstated/templates/ifstated-dna.conf.j2 b/roles/ifstated/templates/ifstated-dna.conf.j2 index 7fcbd5f..ed794f3 100644 --- a/roles/ifstated/templates/ifstated-dna.conf.j2 +++ b/roles/ifstated/templates/ifstated-dna.conf.j2 @@ -17,10 +17,9 @@ state master { init { # spoof mac to keep dhcp lease in sync with both gw's run "/sbin/ifconfig vio1 lladdr {{ gw_home_mac }} up" - # flush routes and run dhclient and dhcpcd + # flush routes and renew lease run "/sbin/route -qn flush" - run "/sbin/dhclient vio1" - #run "/sbin/rcctl restart dhcpcd > /dev/null" + run "/usr/sbin/dhcpleasectl vio1" # reset firewall rules run "sleep 5 ; pfctl -f /etc/pf.conf" } @@ -31,8 +30,6 @@ state master { state backup { init { - # kill dhclient (TODO: better command for this) - run "pkill -9 dhclient" # bring down interface and reset mac run "/sbin/ifconfig vio1 delete lladdr {{ gw_home_mac }} down" # flush routes and fix default route