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>
Not all markups were quite right. The output_* functions must return an
int. The rest were as a matter of fact correct.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This make the table output good looking, and allows users to click table
headings to sort data by column without rerunning the analysis.
Unfortunately this change is breaking change, meaning the old CSS tags are
no longer supported, nor partial html output that printed only the table.
Proposed-by: Aaron Paetznick <aaronp@critd.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Alarm criteria based solely on percentage was found to be difficult to be
tricky to setup in environments that has small ranges and big shared-nets
mixed up together. These two new options should help making alarming more
useful.
Requested-by: Frank Bulk <fbulk@mypremieronline.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Some users may not want to have alarms about ranges that are part of a
shared-network, so allow them to suppress such.
Requested-by: Frank Bulk <fbulk@mypremieronline.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Everything should just work out of the box without poking. This change
makes that goal to be yet agian one step closer. In same go make all
autotools related variable substitutions better.
Requested-by: Martijn van Brummelen <martijn@brumit.nl>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
src/getdata.c:248:22: warning: 'range_p' may be used uninitialized in this
function [-Wmaybe-uninitialized]
src/other.c:383:1: warning: control reaches end of non-void function
[-Wreturn-type]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Use error(3) function, that has gnulib portability fixes, instead of err(3)
and warn(3) family.
Reported-by: Anton Tkachev <antont@bk.ru>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Debian package lint found going back to roman mode was broken.
Reported-by: Martijn van Brummelen <martijn@brumit.nl>
Signed-off-by: Sami Kerola <kerolasa@cloudflare.com>
Remove unnecessary html indentation, so that there is less page content
to transfer. Right align the network names, and IP's so that they are
easier to read. And ensure quoting is done correctly.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
For some reason missing information has been overlooked for years.
Perhaps there is aren't that many users who are interested of the touched
addresses.
Proposed-by: Aaron Paetznick <aaronp@critd.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
src/other.c:398:4: runtime error: unsigned integer overflow: 0 - 1 cannot
be represented in type 'unsigned int'
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This tests ensures the problem fixed by Wolfgang Steudel cannot reoccur.
See the reference commit for details.
Reference: 5519763ba9
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
We have defined some shared networks with a couple of address ranges
and wanted to monitor the availability of free IP addresses in the
shared networks. We were wondering why in some cases there was no
warning, although one shared network's usage was above the threshold.
We found the reason. In output_alarming() the code was not skipping
"All networks", but missing the last shared network in the list.
Moving "shared_p++" to the beginning of the loop seems to solve the
bug.
Reviewed-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Wolfgang Steudel <wolfgang.steudel@tu-ilmenau.de>