diff options
Diffstat (limited to 'usr/local/www/services_dhcp.php')
-rwxr-xr-x | usr/local/www/services_dhcp.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php index 06065f3..652ccd3 100755 --- a/usr/local/www/services_dhcp.php +++ b/usr/local/www/services_dhcp.php @@ -35,7 +35,16 @@ $if = $_GET['if']; if ($_POST['if']) $if = $_POST['if']; -$iflist = array("lan" => "LAN"); +/* if OLSRD is enabled, allow WAN to house DHCP. */ +foreach($config['installedpackages']['olsrd']['config'] as $olsrd) { + if($olsr['enable']) { + $iflist = array("lan" => "LAN", "wan" => "WAN"); + break; + } +} + +if(!$iflist) + $iflist = array("lan" => "LAN"); for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++) { $oc = $config['interfaces']['opt' . $i]; |