From fe0c57fc09c20c4e08c350393d94cb5f72767aa3 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Fri, 27 Sep 2024 17:11:50 +0200 Subject: [PATCH] dhcp4: fix drop-lease-and-restart logic The code should immediately attempt obtaining a lease from scratch instead of remaining stuck in the wait-until-renew loop. --- cmd/dhcp4/dhcp4.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/dhcp4/dhcp4.go b/cmd/dhcp4/dhcp4.go index 67d3dc6..4f3436e 100644 --- a/cmd/dhcp4/dhcp4.go +++ b/cmd/dhcp4/dhcp4.go @@ -187,6 +187,7 @@ ObtainOrRenew: // Still not healthy? Drop DHCP lease and start from scratch. log.Printf("unhealthy for 5 cycles, starting over without lease") c.Ack = nil + continue ObtainOrRenew case <-usr2: log.Printf("SIGUSR2 received, sending DHCPRELEASE")