diff options
-rwxr-xr-x | usr/local/www/services_dhcp.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php index 309376c..0895e16 100755 --- a/usr/local/www/services_dhcp.php +++ b/usr/local/www/services_dhcp.php @@ -60,9 +60,13 @@ for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++) { } } -if (!$if || !isset($iflist[$if])) - $if = "lan"; - +/* set the starting interface */ +if($config['interfaces']['lan']) + if (!$if || !isset($iflist[$if])) + $if = "lan"; +else + $if = "wan"; + $pconfig['range_from'] = $config['dhcpd'][$if]['range']['from']; $pconfig['range_to'] = $config['dhcpd'][$if]['range']['to']; $pconfig['deftime'] = $config['dhcpd'][$if]['defaultleasetime']; |