Skip to content

Commit

Permalink
dhcpd: fix v6 as well
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeneOne1 committed Sep 27, 2023
1 parent 03b5454 commit 37a9355
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/dhcpd/v6_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ func (s *v6Server) IPByHost(host string) (ip netip.Addr) {
func (s *v6Server) ResetLeases(leases []*Lease) (err error) {
defer func() { err = errors.Annotate(err, "dhcpv6: %w") }()

s.leasesLock.Lock()
defer s.leasesLock.Unlock()

s.leases = nil
for _, l := range leases {
ip := net.IP(l.IP.AsSlice())
Expand Down

0 comments on commit 37a9355

Please sign in to comment.