Project

General

Profile

« Previous | Next » 

Revision 12fafaf7

Added by Chris Buechler over 15 years ago

I see no reason to retain this "braindeadedness". Create each CARP VIP with its VHID, and destroy accordingly.

Resolves #151

View differences:

etc/inc/interfaces.inc
786 786
		mwexec("/sbin/ifconfig " . get_real_interface($vip['interface']) . " delete {$vip['subnet']}");
787 787
		break;
788 788
	case "carp":
789
		$vipif = "vip" . $vip['vhid'];
790
		mwexec("/sbin/ifconfig {$vipif} delete");
791
                mwexec("/sbin/ifconfig {$vipif} down");
792
		mwexec("/sbin/ifconfig {$vipif} destroy");
793
		break;
789 794
	case "carpdev-dhcp":
790 795
		$vipif = "vip" . $vip['vhid'];
791 796
		mwexec("/sbin/ifconfig {$vipif} delete");
......
1180 1185
	if ($vip['password'] != "")
1181 1186
		$password = " pass \"" . $vip_password . "\"";
1182 1187

  
1183
	// This is the most brain dead decision taken for carp
1184
	// Carp vhid is confirmed by GUI to be sequencial and limited to 256
1185
	// eri@ I am leaving the comment but not touching the code
1186
	//      since someone thinks he/she knows better.
1187
	$vipif = find_next_available_vip();
1188
	// set the vip interface to the vhid
1189
	$vipif = "vip{$vip['vhid']}";
1188 1190

  
1189 1191
	$interface = interface_translate_type_to_real($vip['interface']);
1190 1192
	/*
......
2815 2817
		unlink_if_exists(CRON_PPPOE_CMD_FILE);
2816 2818
}
2817 2819

  
2818
?>
2820
?>

Also available in: Unified diff