Project

General

Profile

« Previous | Next » 

Revision 0793de1a

Added by Luiz Souza almost 8 years ago

Fix the QinQ support.

Bring the QinQ support to the VLAN dotted format.

To avoid breaks third party software (such as dhcpd), we silently ignore the interfaces with names bigger than the maximum size in FreeBSD.

Ticket #7942

View differences:

src/usr/local/www/interfaces_vlan.php
38 38

  
39 39
$a_vlans = &$config['vlans']['vlan'] ;
40 40

  
41
function vlan_inuse($num) {
42
	global $config, $a_vlans;
43

  
44
	$iflist = get_configured_interface_list(true);
45
	foreach ($iflist as $if) {
46
		if ($config['interfaces'][$if]['if'] == $a_vlans[$num]['vlanif']) {
47
			return true;
48
		}
49
	}
50

  
51
	return false;
52
}
53

  
54 41
if ($_POST['act'] == "del") {
55 42
	if (!isset($_POST['id'])) {
56 43
		$input_errors[] = gettext("Wrong parameters supplied");
57 44
	} else if (empty($a_vlans[$_POST['id']])) {
58 45
		$input_errors[] = gettext("Wrong index supplied");
59 46
	/* check if still in use */
60
	} else if (vlan_inuse($_POST['id'])) {
47
	} else if (vlan_inuse($a_vlans[$_POST['id']])) {
61 48
		$input_errors[] = gettext("This VLAN cannot be deleted because it is still being used as an interface.");
62 49
	} else {
63 50
		if (does_interface_exist($a_vlans[$_POST['id']]['vlanif'])) {

Also available in: Unified diff