dhcpd-pools/THANKS
Enno Gröper ae7747db87 analyse: critical bug in the counting code
The problem is, that you simply count all lease occurrences in
dhcpd.leases, but only the last ones for each ip address are
valid.  The lease file is more like a logfile of what has been
done, than a real database.  To fix the counting issue, I'm using
a single hash (from uthash.h [1]) for the counting.  This way
only the last lease entry for each IP gets into my counting
structure.

When you remove the duplicates in prepare_data(), you don't have
the information anymore, if the active lease entry or the free
lease entry came last.  Simply deleting each ip from the touches
array, that is already in the leases array, gives you a big
chance to count wrong.  Another way of fixing this would be to
not only store the ips in your arrays, but a structure containing
the ip and a global lease entry counter.  Then you could delete
all entries except for the latest.

[1] http://uthash.sourceforge.net/

Reported-by: Huangy
Signed-off-by: Enno Gröper <groepeen@cms.hu-berlin.de>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-05-02 19:57:45 +02:00

24 lines
404 B
Text

dhcpd-pools THANKS file
Project is maintained by Sami Kerola <kerolasa@iki.fi>
People who reported problems, give improvement suggestions or even
contributed code.
Otto J. Mäkelä
Mika Paananen
Frank Bulk
Roar Pettersen
Jeff Wieland
Rusty
Fredrik Vöcks
Dan Thorson
Stian Øvrevåge
Dominic Germain
Anders LÃ¥stad
Thor Eivind Brantzeg
Ahmed AL Dakhil
Adam Ciarcinski
Rezso Gajdóczy
Robert Viou
Enno Gröper