Project

General

Profile

« Previous | Next » 

Revision 83bdca55

Added by Ermal Luçi about 16 years ago

Do not use tags for vlan interface names since there might be same vlan tags on different parent interfaces and this will break configs and will hide the reason it does not work. Thanks-to: smos@

View differences:

etc/inc/config.inc
810 810
	if (is_array($config['vlans']['vlan']) && count($config['vlans']['vlan'])) {
811 811

  
812 812
		echo "\n\nVLAN interfaces:\n\n";
813
		foreach ($config['vlans']['vlan'] as $vlan) {
813
		foreach ($config['vlans']['vlan'] as $vlanid => $vlan) {
814 814

  
815
			echo sprintf("% -8s%s\n", "vlan{$vlan['tag']}",
815
			echo sprintf("% -8s%s\n", "vlan{$vlanid}",
816 816
				"VLAN tag {$vlan['tag']}, interface {$vlan['if']}");
817 817

  
818
			$iflist['vlan' . $vlan['tag']] = array();
818
			$iflist['vlan' . $vlanid] = array();
819 819
		}
820 820
	}
821 821

  
......
1146 1146

  
1147 1147
		echo "Enter the VLAN tag (1-4094): ";
1148 1148
		$vlan['tag'] = chop(fgets($fp));
1149
		$vlan['vlanif'] = "vlan{$vlan['tag']}";
1149
		$vlan['vlanif'] = "vlan{$vlanif}";
1150 1150
		if (!is_numericint($vlan['tag']) || ($vlan['tag'] < 1) || ($vlan['tag'] > 4094)) {
1151 1151
			echo "\nInvalid VLAN tag '{$vlan['tag']}'\n";
1152 1152
			continue;

Also available in: Unified diff