summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-04-26 22:58:00 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-04-26 22:58:00 +0000
commit97737adf898cfbffc5fe5e06f9d1a5185fa519d4 (patch)
tree811b0fc04d0e05fd7b653e7c0716119e1e7e9702 /usr
parent23a4ebae3f321432cf5e619f5b6bf163f685e199 (diff)
downloadpfsense-97737adf898cfbffc5fe5e06f9d1a5185fa519d4.zip
pfsense-97737adf898cfbffc5fe5e06f9d1a5185fa519d4.tar.gz
Correctly count dhcp range
This should resolve Ticket #40
Diffstat (limited to 'usr')
-rw-r--r--usr/local/www/wizards/setup_wizard.xml8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr/local/www/wizards/setup_wizard.xml b/usr/local/www/wizards/setup_wizard.xml
index d8c02a9..b3192eb 100644
--- a/usr/local/www/wizards/setup_wizard.xml
+++ b/usr/local/www/wizards/setup_wizard.xml
@@ -392,11 +392,13 @@
</field>
</fields>
<stepsubmitphpaction>
- $ip = $_POST['adminpassword'];
$ft = split("\.", $_POST['ip']);
$ft_ip = $ft[0] . "." . $ft[1] . "." . $ft[2] . ".";
- $config['dhcpd']['lan']['range']['from'] = $ft_ip . ".100";
- $config['dhcpd']['lan']['range']['to'] = $ft_ip . ".250";
+ $config['dhcpd']['lan']['range']['from'] = $ft_ip . ".50";
+ $highestip = gen_subnet_max($_POST['ip'], $config['interfaces']['lan']['subnet']);
+ $hi = split("\.", $highestip);
+ $highestip = $hi[3]-1;
+ $config['dhcpd']['lan']['range']['to'] = $ft_ip . $highestip;
</stepsubmitphpaction>
</step>
<step>
OpenPOWER on IntegriCloud