Project

General

Profile

« Previous | Next » 

Revision 640b3a9a

Added by Seth Mos over 14 years ago

remove some debugging from filter inc, show correct ipv6 gateway from function

View differences:

etc/inc/gwlb.inc
147 147
		}
148 148

  
149 149
		/* Interface ip is needed since apinger will bind a socket to it. */
150
		$gwifip = find_interface_ip($gateway['interface'], true);
150
		if (is_ipaddrv4($gateway['gateway'])) {
151
			$gwifip = find_interface_ip($gateway['interface'], true);
152
		}
153
		if (is_ipaddrv6($gateway['gateway'])) {
154
			$gwifip = find_interface_ipv6($gateway['interface'], true);
155
		}
151 156
		if (!is_ipaddr($gwifip))
152 157
			continue; //Skip this target
153 158

  
......
535 540
	global $config, $g;
536 541

  
537 542
	$gw = NULL;
538

  
539 543
	$gwcfg = $config['interfaces'][$interface];
540 544
	if (!empty($gwcfg['gateway']) && is_array($config['gateways']['gateway_item'])) {
541 545
		foreach($config['gateways']['gateway_item'] as $gateway) {
542
			if(($gateway['name'] == $gwcfg['gateway']) && (is_ipaddrv6($gateway['gateway']))) {
546
			if(($gateway['name'] == $gwcfg['gatewayv6']) && (is_ipaddrv6($gateway['gateway']))) {
543 547
				$gw = $gateway['gateway'];
544 548
				break;
545 549
			}

Also available in: Unified diff