summaryrefslogtreecommitdiffstats
path: root/usr/local/www/interfaces_qinq.php
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-01-22 15:00:28 -0200
committerRenato Botelho <garga@FreeBSD.org>2013-01-22 15:00:28 -0200
commiteea7eb99843ee807fd9e41f5fda8ee8f6356bef2 (patch)
treecb1fb6edbf5393bf0a23e650caaf20433b06e2bd /usr/local/www/interfaces_qinq.php
parent782e33f83294568fb9f37cb29d8e16d7369d3ebd (diff)
downloadpfsense-eea7eb99843ee807fd9e41f5fda8ee8f6356bef2.zip
pfsense-eea7eb99843ee807fd9e41f5fda8ee8f6356bef2.tar.gz
Validate QinQ vlan interface to be sure it exists
Diffstat (limited to 'usr/local/www/interfaces_qinq.php')
-rwxr-xr-xusr/local/www/interfaces_qinq.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr/local/www/interfaces_qinq.php b/usr/local/www/interfaces_qinq.php
index c9eef34..dcb6b55 100755
--- a/usr/local/www/interfaces_qinq.php
+++ b/usr/local/www/interfaces_qinq.php
@@ -59,11 +59,14 @@ function qinq_inuse($num) {
}
if ($_GET['act'] == "del") {
+ $id = $_GET['id'];
+
/* check if still in use */
- if (qinq_inuse($_GET['id'])) {
+ if (qinq_inuse($id)) {
$input_errors[] = gettext("This QinQ cannot be deleted because it is still being used as an interface.");
+ } elseif (empty($a_qinqs[$id]['vlanif']) || !does_interface_exist($a_qinqs[$id]['vlanif'])) {
+ $input_errors[] = gettext("QinQ interface does not exist");
} else {
- $id = $_GET['id'];
$qinq =& $a_qinqs[$id];
$delmembers = explode(" ", $qinq['members']);
OpenPOWER on IntegriCloud