mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-22 04:55:33 +03:00
- dhcp: don't replace a static lease with a dynamic one
This commit is contained in:
parent
f6404ef181
commit
fd3e153a04
1 changed files with 3 additions and 1 deletions
|
@ -506,7 +506,9 @@ func (s *Server) handleDHCP4Request(p dhcp4.Packet, options dhcp4.Options) dhcp4
|
||||||
return dhcp4.ReplyPacket(p, dhcp4.NAK, s.ipnet.IP, nil, 0, nil)
|
return dhcp4.ReplyPacket(p, dhcp4.NAK, s.ipnet.IP, nil, 0, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
lease.Expiry = time.Now().Add(s.leaseTime)
|
if lease.Expiry.Unix() != leaseExpireStatic {
|
||||||
|
lease.Expiry = time.Now().Add(s.leaseTime)
|
||||||
|
}
|
||||||
log.Tracef("Replying with ACK. IP: %s HW: %s Expire: %s",
|
log.Tracef("Replying with ACK. IP: %s HW: %s Expire: %s",
|
||||||
lease.IP, lease.HWAddr, lease.Expiry)
|
lease.IP, lease.HWAddr, lease.Expiry)
|
||||||
opt := s.leaseOptions.SelectOrderOrAll(options[dhcp4.OptionParameterRequestList])
|
opt := s.leaseOptions.SelectOrderOrAll(options[dhcp4.OptionParameterRequestList])
|
||||||
|
|
Loading…
Reference in a new issue