Skip to content

Commit

Permalink
dhcp4: fix drop-lease-and-restart logic
Browse files Browse the repository at this point in the history
The code should immediately attempt obtaining a lease from scratch instead of
remaining stuck in the wait-until-renew loop.
  • Loading branch information
stapelberg committed Sep 27, 2024
1 parent f835cdf commit fe0c57f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmd/dhcp4/dhcp4.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit fe0c57f

Please sign in to comment.