lease file grows infinitely large very fast

Bug #35262 reported by Peter Miller
14
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.

Revision history for this message
Peter Miller (pmiller-opensource) wrote : fix dhcp compiler wanrings

This patch fixes all compiler warnings.

See the specific portion of the patch dealing with the include/dhcpd.h file for the bug fix.

Revision history for this message
Matt Zimmerman (mdz) wrote :

Patch available for review

Changed in dhcp3:
assignee: nobody → keybuk
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Another dhclient bug that Martin should really look at, not me

Changed in dhcp3:
assignee: keybuk → pitti
Revision history for this message
Martin Pitt (pitti) wrote :

Peter, thanks for your great analysis and the patch!

Changed in dhcp3:
status: Unconfirmed → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

Oh, this has already been fixed upstream in 3.0.3, and thus in Dapper. Thanks anyway!

Changed in dhcp3:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.