From 41985d6378930831cdb4aa6ff7557a9cebbc1d1b Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Fri, 31 Jan 2020 18:23:50 +0100 Subject: [PATCH] dhcp4d: reduce lease period to 20 minutes This forces devices to renew the lease more often, which is nice when you want to tie home automation behavior to DHCP lease validity. --- internal/dhcp4d/dhcp4d.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/dhcp4d/dhcp4d.go b/internal/dhcp4d/dhcp4d.go index 1b6424a..de7cb55 100644 --- a/internal/dhcp4d/dhcp4d.go +++ b/internal/dhcp4d/dhcp4d.go @@ -89,7 +89,7 @@ func NewHandler(dir string, iface *net.Interface, ifaceName string, conn net.Pac serverIP: serverIP, start: start, leaseRange: 230, - leasePeriod: 2 * time.Hour, + leasePeriod: 20 * time.Minute, options: dhcp4.Options{ dhcp4.OptionSubnetMask: []byte{255, 255, 255, 0}, dhcp4.OptionRouter: []byte(serverIP),