Project

General

Profile

Bug #14586 » interfaces_inc_new.patch

James George, 08/15/2023 03:16 AM

View differences:

interfaces.inc 2023-08-15 10:38:14.251255000 +0800
3054 3054
		$carpvip = get_configured_vip($vip['interface']);
3055 3055
		$iface = $carpvip['interface'];
3056 3056
		$vhid = "vhid {$carpvip['vhid']}";
3057
		if ($af == 'inet') {
3058
			$mode = ($carpvip['carp_mode'] == 'ucast' ? "peer ". escapeshellarg($carpvip['carp_peer']) : " mcast");
3059
		} else {
3060
			$mode = ($carpvip['carp_mode'] == 'ucast' ? "peer6 ". escapeshellarg($carpvip['carp_peer']) : " mcast6");
3061
		}
3057 3062
	}
3058
	mwexec("/sbin/ifconfig " . escapeshellarg($realif) ." {$af} ". escapeshellarg($vip['subnet']) ."/" . escapeshellarg($vip['subnet_bits']) . " alias {$gateway} {$vhid}");
3059
	unset($iface, $af, $realif, $carpvip, $vhid, $gateway);
3063
	mwexec("/sbin/ifconfig " . escapeshellarg($realif) ." {$af} ". escapeshellarg($vip['subnet']) ."/" . escapeshellarg($vip['subnet_bits']) . " alias {$gateway} {$vhid} {$mode}");
3064
	unset($iface, $af, $realif, $carpvip, $vhid, $gateway, $mode);
3060 3065
}
3061 3066

  
3062 3067
function interface_carp_configure(&$vip, $ipalias_reload = false) {
(2-2/2)