summaryrefslogtreecommitdiff
path: root/networking/udhcp/files.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/udhcp/files.c')
-rw-r--r--networking/udhcp/files.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/networking/udhcp/files.c b/networking/udhcp/files.c
index 1c8808c..5b90e26 100644
--- a/networking/udhcp/files.c
+++ b/networking/udhcp/files.c
@@ -195,7 +195,11 @@ void FAST_FUNC read_leases(const char *file)
uint32_t static_nip;
if (expires <= 0)
- continue;
+ /* We keep expired leases: add_lease() will add
+ * a lease with 0 seconds remaining.
+ * Fewer IP address changes this way for mass reboot scenario.
+ */
+ expires = 0;
/* Check if there is a different static lease for this IP or MAC */
static_nip = get_static_nip_by_mac(server_config.static_leases, lease.lease_mac);