Project

General

Profile

« Previous | Next » 

Revision b9ad208c

Added by Renato Botelho over 10 years ago

Fix some logic mistakes introduced in 89f171b052, spotted by phil-davis

View differences:

etc/inc/gwlb.inc
989 989
function get_interface_gateway($interface, &$dynamic = false) {
990 990
	global $config, $g;
991 991

  
992
	if (substr($interface, 0, 4) == 'vip')
992
	if (substr($interface, 0, 4) == '_vip')
993 993
		$interface = get_configured_carp_interface_list($interface, 'inet6', 'iface');
994 994

  
995 995
	$gw = NULL;
......
1022 1022
function get_interface_gateway_v6($interface, &$dynamic = false) {
1023 1023
	global $config, $g;
1024 1024

  
1025
	if (substr($interface, 0, 4) == 'vip')
1025
	if (substr($interface, 0, 4) == '_vip')
1026 1026
		$interface = get_configured_carp_interface_list($interface, 'inet6', 'iface');
1027 1027

  
1028 1028
	$gw = NULL;
etc/inc/interfaces.inc
729 729
					continue;
730 730
			}
731 731
			else if ($checkparent == 2) {
732
				if (substr($gre['if'], 0, 4) == '_vip')
733
					continue;
734
				if (substr($gre['if'], 0, 5) == '_lloc')
732
				if (substr($gre['if'], 0, 4) != '_vip' && substr($gre['if'], 0, 5) != '_lloc')
735 733
					continue;
736 734
				if (empty($config['interfaces'][$gre['if']]) || $config['interfaces'][$gre['if']]['ipaddrv6'] != "track6")
737 735
					continue;
......
814 812
					continue;
815 813
			}
816 814
			else if ($checkparent == 2) {
817
				if (substr($gif['if'], 0, 4) == '_vip')
818
					continue;
819
				if (substr($gif['if'], 0, 5) == '_lloc')
815
				if (substr($gif['if'], 0, 4) != '_vip' && substr($gif['if'], 0, 5) == '_lloc')
820 816
					continue;
821 817
				if (empty($config['interfaces'][$gif['if']]) || $config['interfaces'][$gif['if']]['ipaddrv6'] != "track6")
822 818
					continue;

Also available in: Unified diff