Bug #14586 » interfaces_inc_new.patch
| interfaces.inc 2023-08-15 10:38:14.251255000 +0800 | ||
|---|---|---|
|
$carpvip = get_configured_vip($vip['interface']);
|
||
|
$iface = $carpvip['interface'];
|
||
|
$vhid = "vhid {$carpvip['vhid']}";
|
||
|
if ($af == 'inet') {
|
||
|
$mode = ($carpvip['carp_mode'] == 'ucast' ? "peer ". escapeshellarg($carpvip['carp_peer']) : " mcast");
|
||
|
} else {
|
||
|
$mode = ($carpvip['carp_mode'] == 'ucast' ? "peer6 ". escapeshellarg($carpvip['carp_peer']) : " mcast6");
|
||
|
}
|
||
|
}
|
||
|
mwexec("/sbin/ifconfig " . escapeshellarg($realif) ." {$af} ". escapeshellarg($vip['subnet']) ."/" . escapeshellarg($vip['subnet_bits']) . " alias {$gateway} {$vhid}");
|
||
|
unset($iface, $af, $realif, $carpvip, $vhid, $gateway);
|
||
|
mwexec("/sbin/ifconfig " . escapeshellarg($realif) ." {$af} ". escapeshellarg($vip['subnet']) ."/" . escapeshellarg($vip['subnet_bits']) . " alias {$gateway} {$vhid} {$mode}");
|
||
|
unset($iface, $af, $realif, $carpvip, $vhid, $gateway, $mode);
|
||
|
}
|
||
|
function interface_carp_configure(&$vip, $ipalias_reload = false) {
|
||
- « Previous
- 1
- 2
- Next »