[#266] netdisco subnet utiiization report div by zero (V. Puchkov)

This commit is contained in:
Oliver Gorwits
2016-10-01 19:03:47 +01:00
parent 922c4aa808
commit 3d1d206905
2 changed files with 3 additions and 2 deletions

View File

@@ -15,12 +15,13 @@
* Mention netdisco-users mail list in docs (C. Goldsmith)
* Avoid pathological delete mac for millions of nodes (S. Xu)
* Documentation fixes (S. Elipot)
* [#265] Default sort for Nodes discovered through LLDP/CDP
* [#265] Default sort for Nodes discovered through LLDP/CDP (mzac)
[BUG FIXES]
* Improve security of REMOTE_USER handling (B. Marshall)
* portcontrol and power jobs using device instance instead of IP address
* [#266] netdisco subnet utiiization report div by zero (V. Puchkov)
2.033006 - 2016-03-20

View File

@@ -14,7 +14,7 @@ __PACKAGE__->result_source_instance->view_definition(<<'ENDSQL');
SELECT net as subnet,
power(2, (32 - masklen(net))) as subnet_size,
count(DISTINCT ip) as active,
round(100 * count(DISTINCT ip) / (power(2, (32 - masklen(net))) - 2)) as percent
round(100 * count(DISTINCT ip) / (power(2, (32 - masklen(net))))) as percent
FROM (
SELECT DISTINCT net, ni.ip
FROM subnets s1, node_ip ni