chiark / gitweb /
sd-dhcp-server: change default lease time form 1m to 1h
authorTom Gundersen <teg@jklm.no>
Sat, 21 Jun 2014 13:26:41 +0000 (15:26 +0200)
committerTom Gundersen <teg@jklm.no>
Sat, 21 Jun 2014 13:26:41 +0000 (15:26 +0200)
The short lease was useful for testing, but in real-world usage it is pointless to keep leases
this short. That said, the cost of lease renewal is really low, so we keep the lease still
relatively short at one hour to not get into hard-to-hit problems with lease exhaustion etc.

src/libsystemd-network/sd-dhcp-server.c

index 55a8fbe..c932377 100644 (file)
@@ -29,7 +29,7 @@
 #include "dhcp-server-internal.h"
 #include "dhcp-internal.h"
 
-#define DHCP_DEFAULT_LEASE_TIME         60
+#define DHCP_DEFAULT_LEASE_TIME         3600 /* one hour */
 
 int sd_dhcp_server_set_lease_pool(sd_dhcp_server *server, struct in_addr *address,
                                   size_t size) {