diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/op_mode/show_dhcp.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/op_mode/show_dhcp.py b/src/op_mode/show_dhcp.py index c2a05f516..6b2088732 100755 --- a/src/op_mode/show_dhcp.py +++ b/src/op_mode/show_dhcp.py @@ -158,7 +158,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(ipaddress.ip_address(stop)) - int(ipaddress.ip_address(start)) + # Add +1 because both range boundaries are inclusive + size += int(ipaddress.ip_address(stop)) - int(ipaddress.ip_address(start)) + 1 return size |