dhcpd-pools/TODO
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

41 lines
1.4 KiB
Text

### Bugs
Reported-by: Huangyu: I found dhcpd-pools didn't consider if the
active lease's ends time is passed so it would still think the
lease is active even if dhcpd daemon is stopped for a long time,
the leases marked by "active" state in lease_file has expired in
fact.
### Feature requests
o IPv6 support (Frank)
o Assigned IPs count (Nelson)
o Subnet counting class (Henryk)
o When time stamps are part of lease situation evaluation (see
bug 1) add a --now switch which will one can use to change when
expiry happens.
o Add lease time histogram support.
### Next major version
1 Well structured code, with extendible sane architecture.
2 Server, which has analysis in cache for N seconds and will
answer via socket.
3 Configuration file for server.
4 State file, where different ranges, shared networks etc have
unique identifiers (needed for graphs).
5 Support for snmp and munin protocols.
6 SNMP traps when limits get exceeded.
7 Some clever check_dhcpd_pools binary for Nagios & other
monitoring software.
8 Super server support, which will collect analysis from other
dhcpd-pool servers.
9 Nice http view interface on super server, much can be copied
from http://piwik.org/
10 IPv6 support.
11 And some other things perhaps...
When items 1-7 are done v3 can be released. To support rewrite
there should be a design document with nice blue print, which is
a web page.