summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-01-22 15:53:46 -0200
committerRenato Botelho <garga@FreeBSD.org>2013-01-22 15:53:46 -0200
commit30b3f0681c11754253edc2c9ad457523aab2e6ef (patch)
treebb374727c18f9a8b928437bd4df9770ebb434132 /usr
parentc6f8c4005ea582e799d8f5025c861cda1e973d29 (diff)
downloadpfsense-30b3f0681c11754253edc2c9ad457523aab2e6ef.zip
pfsense-30b3f0681c11754253edc2c9ad457523aab2e6ef.tar.gz
Validate bridge interface before delete it
Diffstat (limited to 'usr')
-rw-r--r--usr/local/www/interfaces_bridge.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr/local/www/interfaces_bridge.php b/usr/local/www/interfaces_bridge.php
index f9faba3..44a21d5 100644
--- a/usr/local/www/interfaces_bridge.php
+++ b/usr/local/www/interfaces_bridge.php
@@ -62,6 +62,8 @@ if ($_GET['act'] == "del") {
/* check if still in use */
if (bridge_inuse($_GET['id'])) {
$input_errors[] = gettext("This bridge cannot be deleted because it is assigned as an interface.");
+ } elseif (!does_interface_exist($a_bridges[$_GET['id']]['bridgeif'])) {
+ $input_errors[] = gettext("Invalid bridge interface.");
} else {
mwexec("/sbin/ifconfig " . $a_bridges[$_GET['id']]['bridgeif'] . " destroy");
unset($a_bridges[$_GET['id']]);
OpenPOWER on IntegriCloud