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:
parent
f835cdf1d6
commit
fe0c57fc09
@ -187,6 +187,7 @@ ObtainOrRenew:
|
|||||||
// Still not healthy? Drop DHCP lease and start from scratch.
|
// Still not healthy? Drop DHCP lease and start from scratch.
|
||||||
log.Printf("unhealthy for 5 cycles, starting over without lease")
|
log.Printf("unhealthy for 5 cycles, starting over without lease")
|
||||||
c.Ack = nil
|
c.Ack = nil
|
||||||
|
continue ObtainOrRenew
|
||||||
|
|
||||||
case <-usr2:
|
case <-usr2:
|
||||||
log.Printf("SIGUSR2 received, sending DHCPRELEASE")
|
log.Printf("SIGUSR2 received, sending DHCPRELEASE")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user