fsync() the leasefile after writing a new lease IP so that it's instantly
updated to disk.
This commit is contained in:
parent
ac38a15c9f
commit
d1f36cf75e
@ -74,4 +74,6 @@ void write_leasefile(struct in_addr ipnum)
|
||||
ret = safe_write(leasefilefd, ip, strlen(ip));
|
||||
if (ret == -1)
|
||||
log_warning("Failed to write ip to lease file.\n");
|
||||
else
|
||||
fsync(leasefilefd);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user