lease file grows infinitely large very fast
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dhcp3 (Ubuntu) |
Fix Released
|
Medium
|
Martin Pitt |
Bug Description
My DHCP server had a problem were it would only serve leases for a couple of minutes before stopping responding altogether. Looking at the server logs, it was soon aparrent that the leases file was growing amazingly fast (the network had a single client at that stage) and it was all the same lease, and it never stopped growing.
I grabbed the dhcp3 source package and rebuilt it. No change in behaviour. But there was a huge number of compiler warnings. One in particular caught my eye: "compaison always false due to limited range of data type". The code looked innocent enough, but it turns out to be a GCC bug mishandling
binding_state_t __attribute__ ((mode (__byte__))) binding_state;
declarations in the struct lease declaration, in the includes/dhcpd.h file. Removing the attributes got rid of the warnings, and fixed the dhcp server, too.
I have a patch which fixes all warnings.
This patch fixes all compiler warnings.
See the specific portion of the patch dealing with the include/dhcpd.h file for the bug fix.