summaryrefslogtreecommitdiffstats
path: root/usr/local/www/interfaces_gre.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-01-24 09:57:22 +0000
committerErmal <eri@pfsense.org>2013-01-24 09:57:22 +0000
commit0e22dda58ddc010d12126ed6af6589ff76d03043 (patch)
treee7396e447b3f7cb6e4582df870f4f022af9c3bf8 /usr/local/www/interfaces_gre.php
parent7309ff3915c58fd664618f01a91dbe8ac9dd2526 (diff)
downloadpfsense-0e22dda58ddc010d12126ed6af6589ff76d03043.zip
pfsense-0e22dda58ddc010d12126ed6af6589ff76d03043.tar.gz
Put some more sanity checking for various interface configurations
Diffstat (limited to 'usr/local/www/interfaces_gre.php')
-rw-r--r--usr/local/www/interfaces_gre.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr/local/www/interfaces_gre.php b/usr/local/www/interfaces_gre.php
index 0cb8cd7..e4e3954 100644
--- a/usr/local/www/interfaces_gre.php
+++ b/usr/local/www/interfaces_gre.php
@@ -60,8 +60,12 @@ function gre_inuse($num) {
}
if ($_GET['act'] == "del") {
+ if (!isset($_GET['id']))
+ $input_errors[] = getext("Wrong parameters supplied");
+ else if (empty($a_gres[$_GET['id']]))
+ $input_errors[] = getext("Wrong index supplied");
/* check if still in use */
- if (gre_inuse($_GET['id'])) {
+ else if (gre_inuse($_GET['id'])) {
$input_errors[] = gettext("This GRE tunnel cannot be deleted because it is still being used as an interface.");
} else {
mwexec("/sbin/ifconfig " . $a_gres[$_GET['id']]['greif'] . " destroy");
OpenPOWER on IntegriCloud