Project

General

Profile

« Previous | Next » 

Revision 9343d750

Added by Ermal LUÇI over 12 years ago

Teach interface_bring_down to read a cofniguration passed in. Will be useful for Ticket #2758

View differences:

etc/inc/interfaces.inc
1070 1070
	}
1071 1071
}
1072 1072

  
1073
function interface_bring_down($interface = "wan", $destroy = false) {
1073
function interface_bring_down($interface = "wan", $destroy = false, $ifacecfg = false) {
1074 1074
	global $config, $g;
1075 1075

  
1076 1076
	if (!isset($config['interfaces'][$interface]))
......
1079 1079
	if ($g['debug'])
1080 1080
		log_error("Calling interface down for interface {$interface}, destroy is " . (($destroy) ? 'true' : 'false'));
1081 1081

  
1082
	$ifcfg = $config['interfaces'][$interface];
1082
	if ($ifacecfg === false)
1083
		$ifcfg = $config['interfaces'][$interface];
1084
	else if (!is_array($ifacecfg))
1085
		log_error(gettext("Wrong parameters used during interface_bring_down"));
1086
	else
1087
		$ifcfg = $ifacecfg;
1088
		
1083 1089

  
1084 1090
	$realif = get_real_interface($interface);
1085 1091

  

Also available in: Unified diff