Project

General

Profile

« Previous | Next » 

Revision e9b6e032

Added by Renato Botelho over 12 years ago

Validate vlan interface before delete it

View differences:

usr/local/www/interfaces_vlan.php
63 63
	/* check if still in use */
64 64
	if (vlan_inuse($_GET['id'])) {
65 65
		$input_errors[] = gettext("This VLAN cannot be deleted because it is still being used as an interface.");
66
	} elseif (!does_interface_exist($a_vlans[$_GET['id']]['vlanif'])) {
67
		$input_errors[] = gettext("Invalid VLAN interface.");
66 68
	} else {
67 69
		mwexec("/sbin/ifconfig " . $a_vlans[$_GET['id']]['vlanif'] . " destroy");
68 70
		unset($a_vlans[$_GET['id']]);

Also available in: Unified diff