summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xusr/local/www/diag_dhcp_leases.php2
-rwxr-xr-xusr/local/www/services_proxyarp_edit.php6
-rwxr-xr-xusr/local/www/services_snmp.php32
-rwxr-xr-xusr/local/www/system_advanced.php5
4 files changed, 27 insertions, 18 deletions
diff --git a/usr/local/www/diag_dhcp_leases.php b/usr/local/www/diag_dhcp_leases.php
index a25f046..7af62dc 100755
--- a/usr/local/www/diag_dhcp_leases.php
+++ b/usr/local/www/diag_dhcp_leases.php
@@ -303,7 +303,7 @@ foreach ($leases as $data) {
break;
}
} else {
- foreach ($config['dhcpd'] as $dhcpif => $dhcpifconf) {
+ foreach ($config['dhcpd'] as $dhcpif => $dhcpifconf) {
if (($lip >= ip2long($dhcpifconf['range']['from'])) && ($lip <= ip2long($dhcpifconf['range']['to']))) {
$data['if'] = $dhcpif;
break;
diff --git a/usr/local/www/services_proxyarp_edit.php b/usr/local/www/services_proxyarp_edit.php
index 99bc0c0..36697dc 100755
--- a/usr/local/www/services_proxyarp_edit.php
+++ b/usr/local/www/services_proxyarp_edit.php
@@ -172,7 +172,11 @@ function typesel_change() {
<td width="22%" valign="top" class="vncellreq">Interface</td>
<td width="78%" class="vtable">
<select name="interface" class="formselect">
- <?php $interfaces = array('wan' => 'WAN', 'lan' => 'LAN');
+ <?php
+ if($config['interfaces']['lan'])
+ $interfaces = array('wan' => 'WAN', 'lan' => 'LAN');
+ else
+ $interfaces = array('wan' => 'WAN');
for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++) {
$interfaces['opt' . $i] = $config['interfaces']['opt' . $i]['descr'];
}
diff --git a/usr/local/www/services_snmp.php b/usr/local/www/services_snmp.php
index f9d1167..91a63cf 100755
--- a/usr/local/www/services_snmp.php
+++ b/usr/local/www/services_snmp.php
@@ -366,21 +366,23 @@ function enable_change(whichone) {
<input name="hostres" type="checkbox" id="hostres" value="yes" <?php if ($pconfig['hostres']) echo "checked"; ?> >Host Resources
</td>
</tr>
- <tr>
- <td width="22%" valign="top" class="vtable"></td>
- <td width="78%" class="vtable">
- <input name="bindlan" type="checkbox" value="yes" <?php if ($pconfig['bindlan']) echo "checked"; ?>> <strong>Bind to LAN interface only</strong>
- <br>
- This option can be useful when trying to access the SNMP agent
- by the LAN interface's IP address through a VPN tunnel terminated on the WAN interface.</td>
- </tr>
- <tr>
- <td width="22%" valign="top">&nbsp;</td>
- <td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save" onClick="enable_change(true)">
- </td>
- </tr>
- </table>
+<?php if(!$config['interfaces']['lan']): ?>
+ <tr>
+ <td width="22%" valign="top" class="vtable"></td>
+ <td width="78%" class="vtable">
+ <input name="bindlan" type="checkbox" value="yes" <?php if ($pconfig['bindlan']) echo "checked"; ?>> <strong>Bind to LAN interface only</strong>
+ <br>
+ This option can be useful when trying to access the SNMP agent
+ by the LAN interface's IP address through a VPN tunnel terminated on the WAN interface.</td>
+ </tr>
+<?php endif; ?>
+ <tr>
+ <td width="22%" valign="top">&nbsp;</td>
+ <td width="78%">
+ <input name="Submit" type="submit" class="formbtn" value="Save" onClick="enable_change(true)">
+ </td>
+ </tr>
+ </table>
</form>
<script language="JavaScript">
<!--
diff --git a/usr/local/www/system_advanced.php b/usr/local/www/system_advanced.php
index 728148e..d6e161c 100755
--- a/usr/local/www/system_advanced.php
+++ b/usr/local/www/system_advanced.php
@@ -635,12 +635,13 @@ include("head.inc");
<td width="22%" valign="top">&nbsp;</td>
<td width="78%"><input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)" /></td>
</tr>
+ <?php if($config['interfaces']['lan']): ?>
<tr>
<td colspan="2" class="list" height="12">&nbsp;</td>
</tr>
<tr>
<td colspan="2" valign="top" class="listtopic">Network Address Translation</td>
- </tr>
+ </tr>
<tr>
<td width="22%" valign="top" class="vncell">Disable NAT Reflection</td>
<td width="78%" class="vtable">
@@ -659,6 +660,8 @@ include("head.inc");
<td width="22%" valign="top">&nbsp;</td>
<td width="78%"><input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)" /></td>
</tr>
+<?php endif; ?>
+
<tr>
<td colspan="2" class="list" height="12">&nbsp;</td>
</tr>
OpenPOWER on IntegriCloud