summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/interfaces.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index f08ca3c..218e6bf 100755
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -54,8 +54,22 @@ require_once("rrd.inc");
require_once("vpn.inc");
require_once("xmlparse_attr.inc");
+$ifdescrs = array('wan' => gettext('WAN'), 'lan' => gettext('LAN'));
+for($j = 1; isset($config['interfaces']['opt' . $j]); $j++) {
+ if(isset($config['interfaces']['opt' . $j]['enable']))
+ $ifdescrs['opt' . $j] = $config['interfaces']['opt' . $j]['descr'];
+}
+
if ($_REQUEST['if']) {
$if = $_REQUEST['if'];
+ $found = false;
+ foreach($ifdescrs as $descr => $ifdescr)
+ if($descr == $if)
+ $found = true;
+ if(!$found) {
+ Header("Location: interfaces.php");
+ exit;
+ }
} else {
$if = "wan";
}
OpenPOWER on IntegriCloud