diff options
author | Phil Davis <phil.davis@inf.org> | 2015-12-18 12:23:26 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2015-12-18 12:23:26 +0545 |
commit | c18ba6bf278c96c3016f92681544e8ccbae79670 (patch) | |
tree | 43397320f9a3ff001aff2bfda4f2f458c73565aa /src/usr/local/www/services_dhcp.php | |
parent | bdabc817f21adb31e6f512fe59f7676997eaee8d (diff) | |
download | pfsense-c18ba6bf278c96c3016f92681544e8ccbae79670.zip pfsense-c18ba6bf278c96c3016f92681544e8ccbae79670.tar.gz |
Fix gen_subnetv4_max
and use it in services_dhcp rather than trying to do the similar
calculation in-line.
Should fix redmine #5654 and probably a bunch of other things that use
gen_subnet_max
Diffstat (limited to 'src/usr/local/www/services_dhcp.php')
-rw-r--r-- | src/usr/local/www/services_dhcp.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/usr/local/www/services_dhcp.php b/src/usr/local/www/services_dhcp.php index 333a322..ffcc6b5 100644 --- a/src/usr/local/www/services_dhcp.php +++ b/src/usr/local/www/services_dhcp.php @@ -798,10 +798,10 @@ $section->addInput(new Form_StaticText( )); // Compose a string to display the required address ranges -$range_from = ip2long(long2ip32(ip2long($ifcfgip) & gen_subnet_mask_long($ifcfgsn))); +$range_from = ip2long(gen_subnetv4($ifcfgip, $ifcfgsn)); $range_from++; -$range_to = ip2long(long2ip32(ip2long($ifcfgip) | (~gen_subnet_mask_long($ifcfgsn)))); +$range_to = ip2long(gen_subnetv4_max($ifcfgip, $ifcfgsn)); $range_to--; $rangestr = long2ip32($range_from) . ' - ' . long2ip32($range_to); |