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.
This commit is contained in:
Michael Stapelberg 2024-09-27 17:11:50 +02:00
parent f835cdf1d6
commit fe0c57fc09

View File

@ -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")