Current output makes some false-positives for situations when multiple
ranges are specified inside single network, for example:
subnet 10.0.0.0 netmask 255.255.254.0 {
...
range 10.0.0.1 10.0.0.254;
range 10.0.1.1 10.0.1.253;
...
}
An alert for range 10.0.0.1 - 10.0.0.254 will be raised even in situations
when range 10.0.1.1 - 10.0.1.253 is completely empty. To cope with this
issue, an -A option is added to treat all single networks as shared-network.
This option changes output for both range and shared networks output if
specified. Frankly saying, using network CIDR as network name is much more
sane for me than 'All Networks'.
Signed-off-by: Boris Lytochkin <lytboris@yandex-team.ru>
It is too difficult to know what users might want to do. Maybe some run
this software all the time from a monitoring system, and in cases like that
it is best to have caches helping.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
It seems that one can reach the abort() with severely broken configuration
file, that is extremely unlikely to run without parser error when given to
ISC dhcpd. So such files ought to be impossible, and it is good enough for
this software to report position where parsing cannot be continued.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Incomplete html page, that was just a html table, was removed some time ago
but deprecated option arguments were unfortunately left to manual that are
now removed.
Reference: 1299737d76
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Most of these functions take pointers as input argument, so they cannot be
considered neiter const or pure. In same go fix few issues noticed when
compiling with smatch.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This makes compiler to options not to be shown when running make, and that
allows noticing warnings more easily.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
src/dhcpd-pools.c:193:18: warning: comparison of integers of different
signs: 'int' and 'unsigned long' [-Wsign-compare]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The html format is done using Bootstrap and DataTables. That deprecatated
need for having cgi to wrap dhcpd-pools.
Reference: 1299737d76
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Options -p or --perfdata (in alarming mode) now enable the output of
additional performance data, i.e. used, touched and backup addresses per
subnet.
Signed-off-by: Manuel Hachtkemper <hacman@math.uni-bonn.de>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Apparently ISC dhcpd allows marking ranges in order from greater IP to
smaller. In these cases first and last IPs are fliped, so that the rest of
the processing can be done without alterations.
Reported-by: Ivanov Ivan <mgfnv9@gmail.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
More than 90% is hefty pay-off.
$ gzip -v -d sitemap.txt.gz
sitemap.txt.gz: 93.5% -- replaced with sitemap.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Use css max-width instead of width this permits narrow screen to wrap lines,
this makes the index page more usable when browsing with a mobile phone or
some other device with limited horizontal dimension. Also get rid of <pre>
tag, and make the sample usage more realistic.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
For some unknown reason mac osx does not change NAN to negative in printout
when asking to do so. To get rid of false positive test results change the
sign of NAN to positive, that may break something for someone if there are
people expecting -NAN when devision with zero happens. But that sort of
breakage is pretty unlikely because it requires broken dhcpd.conf.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
I should consider writing tests before features. Sadly recently added new
options did not even work. Oh well, at least I did not release them before
noticing this.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Users want to know why write fail - was it because disk full, or destination
read-only, or IO error, and so on.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>