dhcp4d: mention apple-suggested lease time of 1 hour

This commit is contained in:
Michael Stapelberg 2020-11-01 19:24:24 +01:00
parent a8fce3cbbc
commit 7f135438b8

View File

@ -96,6 +96,10 @@ func NewHandler(dir string, iface *net.Interface, ifaceName string, conn net.Pac
serverIP: serverIP, serverIP: serverIP,
start: start, start: start,
leaseRange: 230, leaseRange: 230,
// Apple recommends a DHCP lease time of 1 hour in
// https://support.apple.com/de-ch/HT202068,
// so if 20 minutes ever causes any trouble,
// we should try increasing it to 1 hour.
LeasePeriod: 20 * time.Minute, LeasePeriod: 20 * time.Minute,
options: dhcp4.Options{ options: dhcp4.Options{
dhcp4.OptionSubnetMask: []byte{255, 255, 255, 0}, dhcp4.OptionSubnetMask: []byte{255, 255, 255, 0},