From f19651d15bd752943444f80b038d86bcb7be23e3 Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 17 Mar 2010 10:48:00 +0000 Subject: Get up to improvements. --- usr/local/www/services_dhcp.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'usr/local/www/services_dhcp.php') diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php index f177dbb..e8b7a0e 100755 --- a/usr/local/www/services_dhcp.php +++ b/usr/local/www/services_dhcp.php @@ -118,11 +118,12 @@ if (!$_GET['if']) $iflist = get_configured_interface_with_descr(); /* set the starting interface */ -if($config['interfaces']['lan']) { - if (!$if || !isset($iflist[$if])) +if (!$if || !isset($iflist[$if])) { + if($config['interfaces']['lan']) $if = "lan"; -} else - $if = "wan"; + else + $if = "wan"; +} if (is_array($config['dhcpd'][$if])){ if (is_array($config['dhcpd'][$if]['range'])) { @@ -229,7 +230,7 @@ if ($_POST) { // Disallow a range that includes the virtualip if (is_array($config['virtualip']['vip'])) { foreach($config['virtualip']['vip'] as $vip) { - if(strtoupper($vip['interface']) == strtoupper($if)) + if($vip['interface'] == $if) if($vip['subnet'] && is_inrange($vip['subnet'], $_POST['range_from'], $_POST['range_to'])) $input_errors[] = "The subnet range cannot overlap with virtual IP address {$vip['subnet']}."; } -- cgit v1.1