Project

General

Profile

« Previous | Next » 

Revision 3290c9e6

Added by PiBa-NL almost 7 years ago

interfaces, ipalias fix initializing ipaliases that have a carp parent after interface down / up

View differences:

src/etc/inc/gwlb.inc
1428 1428
	return (false);
1429 1429
}
1430 1430

  
1431
function get_interface_gateway($interface, &$dynamic = false) {
1432
	global $config, $g;
1433

  
1431
function get_root_interface($interface) {
1434 1432
	if (substr($interface, 0, 4) == '_vip') {
1435 1433
		$interface = get_configured_vip_interface($interface);
1436 1434
		if (substr($interface, 0, 4) == '_vip') {
1437 1435
			$interface = get_configured_vip_interface($interface);
1438 1436
		}
1439 1437
	}
1438
	return $interface;
1439
}
1440

  
1441
function get_interface_gateway($interface, &$dynamic = false) {
1442
	global $config, $g;
1443
	
1444
	$interface = get_root_interface($interface);
1440 1445

  
1441 1446
	$gw = NULL;
1442 1447
	$gwcfg = $config['interfaces'][$interface];
......
1469 1474
function get_interface_gateway_v6($interface, &$dynamic = false) {
1470 1475
	global $config, $g;
1471 1476

  
1472
	if (substr($interface, 0, 4) == '_vip') {
1473
		$interface = get_configured_vip_interface($interface);
1474
		if (substr($interface, 0, 4) == '_vip') {
1475
			$interface = get_configured_vip_interface($interface);
1476
		}
1477
	}
1477
	$interface = get_root_interface($interface);
1478 1478

  
1479 1479
	$gw = NULL;
1480 1480
	$gwcfg = $config['interfaces'][$interface];

Also available in: Unified diff