To patch a single file, just go to the directory the unpatched file is in and do this:
patch < /path/to/patch/file
To apply a patch to the sources, first create a clean source tree. Then do this:
patch -p1 -d /path/to/source/root < /path/to/patch/file
Here are the patches:
server/stables.c
). Documentation taken
directly from RFC2132, with minor changes to allow for the new
context. If you have 3.0.1rc6 or later, this patch has already
been incorporated into the distribution.
Adds a failover-fudge-factor option to dhcpd.conf. Adds the matching doco to the dhcpd.conf(5) man page.
The failover-fudge-factor statement can be used to specify how many seconds early state transitions to expired are allowed to be. If failover is not enabled, this statement is ignored.
When one failover peer tells the other that a lease has expired, the current time on the receiving peer may be a second or so out. As a result, the receiving peer may regard the lease as still active, and reject the state transition. This fudge factor tells the peer to permit such transitions, even if they are up to this many seconds "early".
If you are seeing messages in your server logs about invalid state transitions from active to expired, this fudge factor may help. Although fudge factors of up to 65535 are possible, the value used should be kept as small as possible consistent with overcoming the problem. Start with one second and work up.
This patch against 3.0.1rc6 should work fine with earlier 3.0x source trees.
dhcp-3.0.1rc6_k1_rewrite_delay.diff
The new option lets you set the maximum allowable period between complete rewrites of the leases file. The default is one hour (3600 seconds). Big values increase the risk of data loss if the server terminates unexpectedly. Small values reduce this risk, but can cause the server to spend a lot of time writing lease info to disk, especially if there are a large number of leases to write.
This patch against 3.0.1rc6 should work fine with earlier 3.0x source trees.