aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/files.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/udhcp/files.c')
-rw-r--r--networking/udhcp/files.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/networking/udhcp/files.c b/networking/udhcp/files.c
index 1c8808c0f..7b57c6258 100644
--- a/networking/udhcp/files.c
+++ b/networking/udhcp/files.c
@@ -195,7 +195,11 @@ void FAST_FUNC read_leases(const char *file)
195 uint32_t static_nip; 195 uint32_t static_nip;
196 196
197 if (expires <= 0) 197 if (expires <= 0)
198 continue; 198 /* We keep expired leases: add_lease() will add
199 * a lease with 0 seconds remaining.
200 * Fewer IP address changes this way for mass reboot scenario.
201 */
202 expires = 0;
199 203
200 /* Check if there is a different static lease for this IP or MAC */ 204 /* Check if there is a different static lease for this IP or MAC */
201 static_nip = get_static_nip_by_mac(server_config.static_leases, lease.lease_mac); 205 static_nip = get_static_nip_by_mac(server_config.static_leases, lease.lease_mac);
@@ -222,7 +226,7 @@ void FAST_FUNC read_leases(const char *file)
222#endif 226#endif
223 } 227 }
224 } 228 }
225 log1("Read %d leases", i); 229 log1("read %d leases", i);
226 ret: 230 ret:
227 close(fd); 231 close(fd);
228} 232}