summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-07-20 18:29:51 +0200
committerGitHub <noreply@github.com>2020-07-20 18:29:51 +0200
commita57cdd56aa50e8d33d98e03e068e2447890abe0e (patch)
tree8026926d4db54a3010f8474f0ae8448a164d7b3b
parent94442436c0d66030d0b8ea2bc2ff86c74551e8e1 (diff)
parent452701bef32c07e0c2a49d37fac93a94038dace1 (diff)
downloadvyos-1x-a57cdd56aa50e8d33d98e03e068e2447890abe0e.tar.gz
vyos-1x-a57cdd56aa50e8d33d98e03e068e2447890abe0e.zip
Merge pull request #509 from efficiosoft/t2717_dhcp_pool_size
dhcp-server: T2717: Fix DHCP pool size in statistics
-rwxr-xr-xsrc/op_mode/show_dhcp.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/op_mode/show_dhcp.py b/src/op_mode/show_dhcp.py
index f9577e57e..ff1e3cc56 100755
--- a/src/op_mode/show_dhcp.py
+++ b/src/op_mode/show_dhcp.py
@@ -161,7 +161,8 @@ def get_pool_size(config, pool):
start = config.return_effective_value("service dhcp-server shared-network-name {0} subnet {1} range {2} start".format(pool, s, r))
stop = config.return_effective_value("service dhcp-server shared-network-name {0} subnet {1} range {2} stop".format(pool, s, r))
- size += int(ip_address(stop)) - int(ip_address(start))
+ # Add +1 because both range boundaries are inclusive
+ size += int(ip_address(stop)) - int(ip_address(start)) + 1
return size