2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-30 22:05:23 +00:00

[master] When writing a client lease file use the fsync call

This commit is contained in:
Shawn Routhier
2014-05-19 13:22:03 -07:00
parent 79818c9344
commit 8a2e40cff8
2 changed files with 5 additions and 1 deletions

View File

@@ -152,6 +152,10 @@ by Eric Young (eay@cryptsoft.com).
lease file and the DUID will be written out to the main lease file.
[ISC-Bugs #34886]
- Have the client fsync the lease file to avoid lease corruption if the
client hibernates or otherwise shuts down.
[ISC-Bugs #35894]
Changes since 4.3.0rc1
- None

View File

@@ -1271,7 +1271,7 @@ void bind_lease (client)
/* Write out the new lease if it has been long enough. */
if (!client->last_write ||
(cur_time - client->last_write) >= MIN_LEASE_WRITE)
write_client_lease(client, client->new, 0, 0);
write_client_lease(client, client->new, 0, 1);
/* Replace the old active lease with the new one. */
if (client->active)