diff options
-rw-r--r-- | usr.sbin/dhcpd/dhcpd.8 | 24 | ||||
-rw-r--r-- | usr.sbin/dhcpd/dhcpd.leases.5 | 39 |
2 files changed, 4 insertions, 59 deletions
diff --git a/usr.sbin/dhcpd/dhcpd.8 b/usr.sbin/dhcpd/dhcpd.8 index a6ce9037880..41ef5f19cb3 100644 --- a/usr.sbin/dhcpd/dhcpd.8 +++ b/usr.sbin/dhcpd/dhcpd.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: dhcpd.8,v 1.3 2004/04/20 00:27:57 henning Exp $ +.\" $OpenBSD: dhcpd.8,v 1.4 2004/04/20 03:46:19 henning Exp $ .\" .\" Copyright (c) 1995, 1996 The Internet Software Consortium. .\" All rights reserved. @@ -100,24 +100,6 @@ reads the .Pa dhcpd.leases file to refresh its memory about what leases have been assigned. .Pp -New leases are appended to the end of the -.Pa dhcpd.leases -file. -In order to prevent the file from becoming arbitrarily large, -from time to time -.Nm -creates a new -.Pa dhcpd.leases -file from its in-core lease database. -Once this file has been written to disk, the old file is renamed -.Pa dhcpd.leases~ , -and the new file is renamed -.Pa dhcpd.leases . -If the system crashes in the middle of this process, whichever -.Pa dhcpd.leases -file remains will contain all the lease information, so there is no need for -a special crash recovery process. -.Pp BOOTP support is also provided by this server. Unlike DHCP, the BOOTP protocol does not provide a protocol for recovering dynamically-assigned addresses once they are no longer needed. @@ -344,9 +326,7 @@ file syntax is provided in .It /etc/dhcpd.conf DHCPD configuration file. .It /var/db/dhcpd.leases -Current DHCPD lease file. -.It /var/db/dhcpd.leases~ -Backup DHCPD lease file. +DHCPD lease file. .It /var/run/dhcpd.pid DHCPD PID. .El diff --git a/usr.sbin/dhcpd/dhcpd.leases.5 b/usr.sbin/dhcpd/dhcpd.leases.5 index 106e7956a29..910fb748c3d 100644 --- a/usr.sbin/dhcpd/dhcpd.leases.5 +++ b/usr.sbin/dhcpd/dhcpd.leases.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: dhcpd.leases.5,v 1.2 2004/04/15 08:34:20 jmc Exp $ +.\" $OpenBSD: dhcpd.leases.5,v 1.3 2004/04/20 03:46:19 henning Exp $ .\" .\" Copyright (c) 1997, 1998 The Internet Software Consortium. .\" All rights reserved. @@ -51,38 +51,6 @@ Every time a lease is acquired, renewed or released, its new value is recorded at the end of the lease file. So if more than one declaration appears for a given lease, the last one in the file is the current one. -.Pp -When -.Xr dhcpd 8 -is first installed, there is no lease database. -However, dhcpd requires that a lease database be present before it will start. -To make the initial lease database, just create an empty file called -.Pa /var/db/dhcpd.leases . -.Pp -In order to prevent the lease database from growing without bound, the -file is rewritten from time to time. -First, a temporary lease database is created and all known leases are -dumped to it. -Then, the old lease database is renamed -.Pa /var/db/dhcpd.leases~ . -Finally, the newly written lease database is moved into place. -.Pp -There is a window of vulnerability where if the dhcpd process is -killed or the system crashes after the old lease database has been -renamed but before the new one has been moved into place, there will -be no -.Pa /var/db/dhcpd.leases . -In this case, dhcpd will refuse to start, -and will require manual intervention. -.Em DO NOT -simply create a new lease file when this happens \- if you do, -you will lose all your old bindings, and chaos will ensue. -Instead, rename -.Pa /var/db/dhcpd.leases~ -to -.Pa /var/db/dhcpd.leases , -restoring the old, valid lease file, and then start dhcpd. -This guarantees that a valid lease file will be restored. .Sh FORMAT Lease descriptions are stored in a format that is parsed by the same recursive descent parser used to read the @@ -134,8 +102,6 @@ and the second also a number from 0 to 59. .Pp Lease times are specified in Coordinated Universal Time (UTC), not in the local time zone. -.Qq Li date -u -will show the current time in UTC. .Pp The MAC address of the network interface that was used to acquire the lease is recorded with the @@ -169,7 +135,7 @@ statement. .Pp If the client sends its hostname using the .Ic Hostname -option, as Windows 95 does, it is recorded using the +option it is recorded using the .Ic hostname statement. .Pp @@ -204,7 +170,6 @@ In that case, the address is immediately assigned to the client. .Sh FILES .Bl -tag -width Ds -compact .It /var/db/dhcpd.leases -.It /var/db/dhcpd.leases~ .El .Sh SEE ALSO .Xr dhcp-options 5 , |