alarming: include last shared network in alarming [off by one]

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>
This commit is contained in:
Wolfgang Steudel 2014-11-13 09:45:59 +00:00 committed by Sami Kerola
parent 190df198a4
commit 5519763ba9
2 changed files with 2 additions and 1 deletions

1
THANKS
View file

@ -31,3 +31,4 @@ Ryan Steinmetz
Dan Pritts
Fredrik Lysén
Conor McCarthy
Wolfgang Steudel