Validate QinQ vlan interface to be sure it exists

This commit is contained in:
Renato Botelho 2013-01-22 15:00:28 -02:00
parent 782e33f832
commit eea7eb9984

View File

@ -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']);