summaryrefslogtreecommitdiffstats
path: root/usr/local/www/interfaces_vlan.php
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-01-22 15:08:32 -0200
committerRenato Botelho <garga@FreeBSD.org>2013-01-22 15:08:32 -0200
commite9b6e032bcb4df8a214f13e4c27e4444b2551e45 (patch)
treef8b622a5f05e612997dc96f84599110cb4fb81c1 /usr/local/www/interfaces_vlan.php
parenteea7eb99843ee807fd9e41f5fda8ee8f6356bef2 (diff)
downloadpfsense-e9b6e032bcb4df8a214f13e4c27e4444b2551e45.zip
pfsense-e9b6e032bcb4df8a214f13e4c27e4444b2551e45.tar.gz
Validate vlan interface before delete it
Diffstat (limited to 'usr/local/www/interfaces_vlan.php')
-rwxr-xr-xusr/local/www/interfaces_vlan.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr/local/www/interfaces_vlan.php b/usr/local/www/interfaces_vlan.php
index 5333c6c..dadeb07 100755
--- a/usr/local/www/interfaces_vlan.php
+++ b/usr/local/www/interfaces_vlan.php
@@ -63,6 +63,8 @@ if ($_GET['act'] == "del") {
/* check if still in use */
if (vlan_inuse($_GET['id'])) {
$input_errors[] = gettext("This VLAN cannot be deleted because it is still being used as an interface.");
+ } elseif (!does_interface_exist($a_vlans[$_GET['id']]['vlanif'])) {
+ $input_errors[] = gettext("Invalid VLAN interface.");
} else {
mwexec("/sbin/ifconfig " . $a_vlans[$_GET['id']]['vlanif'] . " destroy");
unset($a_vlans[$_GET['id']]);
OpenPOWER on IntegriCloud