From 89f171b052fbe72aed654d2a1c3d5a24e9bf9902 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20LU=C3=87I?= Date: Thu, 15 Jan 2015 20:17:46 +0100 Subject: Ticket #3997, teach code to track carp through uniqids(). Missing carp GUI changes and upgrade code --- etc/inc/filter.inc | 2 +- etc/inc/gwlb.inc | 7 +- etc/inc/interfaces.inc | 176 ++++++++++++++++++++++++++++++++-------------- etc/inc/pfsense-utils.inc | 14 ++-- etc/inc/services.inc | 6 +- etc/inc/system.inc | 45 ------------ etc/inc/util.inc | 4 +- etc/inc/vpn.inc | 2 +- etc/rc.carpbackup | 21 +++--- etc/rc.carpmaster | 23 +++--- 10 files changed, 168 insertions(+), 132 deletions(-) (limited to 'etc') diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 03d21f2..6b044d6 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -3678,7 +3678,7 @@ function filter_generate_ipsec_rules($log = array()) { } if (strpos($ph1ent['interface'], "_vip")) - list($parentinterface, $vhid) = explode("_vip", $ph1ent['interface']); + $parentinterface = get_configured_carp_interface_list($ph1ent['interface'], '', 'iface'); else $parentinterface = $ph1ent['interface']; if (empty($FilterIflist[$parentinterface]['descr'])) { diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index 53e69eb..70acf38 100644 --- a/etc/inc/gwlb.inc +++ b/etc/inc/gwlb.inc @@ -989,8 +989,10 @@ function lookup_gateway_interface_by_name($name) { function get_interface_gateway($interface, &$dynamic = false) { global $config, $g; - $gw = NULL; + if (substr($interface, 0, 4) == 'vip') + $interface = get_configured_carp_interface_list($interface, 'inet6', 'iface'); + $gw = NULL; $gwcfg = $config['interfaces'][$interface]; if (!empty($gwcfg['gateway']) && is_array($config['gateways']['gateway_item'])) { foreach($config['gateways']['gateway_item'] as $gateway) { @@ -1020,6 +1022,9 @@ function get_interface_gateway($interface, &$dynamic = false) { function get_interface_gateway_v6($interface, &$dynamic = false) { global $config, $g; + if (substr($interface, 0, 4) == 'vip') + $interface = get_configured_carp_interface_list($interface, 'inet6', 'iface'); + $gw = NULL; $gwcfg = $config['interfaces'][$interface]; if (!empty($gwcfg['gatewayv6']) && is_array($config['gateways']['gateway_item'])) { diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index cd709a9..6c5ee1b 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -412,7 +412,8 @@ function interfaces_bridge_configure($checkmember = 0, $realif = "") { continue; if ($checkmember == 1) { - if (strstr($bridge['if'], "_vip")) + /* XXX: It should not be possible no? */ + if (strstr($bridge['if'], '_vip')) continue; $members = explode(',', $bridge['members']); foreach ($members as $member) { @@ -421,6 +422,7 @@ function interfaces_bridge_configure($checkmember = 0, $realif = "") { } } else if ($checkmember == 2) { + /* XXX: It should not be possible no? */ if (!strstr($bridge['if'], "_vip")) continue; $members = explode(',', $bridge['members']); @@ -719,13 +721,17 @@ function interfaces_gre_configure($checkparent = 0, $realif = "") { continue; if ($checkparent == 1) { - if (strstr($gre['if'], "_vip")) + if (substr($gre['if'], 0, 4) == '_vip') + continue; + if (substr($gre['if'], 0, 5) == '_lloc') continue; if (!empty($config['interfaces'][$gre['if']]) && $config['interfaces'][$gre['if']]['ipaddrv6'] == "track6") continue; } else if ($checkparent == 2) { - if (!strstr($gre['if'], "_vip")) + if (substr($gre['if'], 0, 4) == '_vip') + continue; + if (substr($gre['if'], 0, 5) == '_lloc') continue; if (empty($config['interfaces'][$gre['if']]) || $config['interfaces'][$gre['if']]['ipaddrv6'] != "track6") continue; @@ -800,13 +806,17 @@ function interfaces_gif_configure($checkparent = 0, $realif = "") { continue; if ($checkparent == 1) { - if (strstr($gif['if'], "_vip")) + if (substr($gif['if'], 0, 4) == '_vip') + continue; + if (substr($gif['if'], 0, 5) == '_lloc') continue; if (!empty($config['interfaces'][$gif['if']]) && $config['interfaces'][$gif['if']]['ipaddrv6'] == "track6") continue; } else if ($checkparent == 2) { - if (!strstr($gif['if'], "_vip")) + if (substr($gif['if'], 0, 4) == '_vip') + continue; + if (substr($gif['if'], 0, 5) == '_lloc') continue; if (empty($config['interfaces'][$gif['if']]) || $config['interfaces'][$gif['if']]['ipaddrv6'] != "track6") continue; @@ -825,7 +835,7 @@ function interface_gif_configure(&$gif, $gifkey = "") { return -1; $realif = get_real_interface($gif['if']); - $ipaddr = $gif['ipaddr']; + $ipaddr = get_interface_ip($gif['if']); if (is_ipaddrv4($gif['remote-addr'])) { if (is_ipaddrv4($ipaddr)) @@ -4062,7 +4072,7 @@ function convert_friendly_interface_to_friendly_descr($interface) { else $ifdesc = strtoupper($config['interfaces'][$interface]['descr']); break; - } else if (stristr($interface, "_vip")) { + } else if (substr($interface, 0, 4) == '_vip')) { if (is_array($config['virtualip']['vip'])) { foreach ($config['virtualip']['vip'] as $counter => $vip) { if ($vip['mode'] == "carp") { @@ -4071,6 +4081,8 @@ function convert_friendly_interface_to_friendly_descr($interface) { } } } + } else if (substr($interface, 0, 5) == '_lloc')) { + return get_interface_linklocal($interface); } else { /* if list */ $ifdescrs = get_configured_interface_with_descr(false, true); @@ -4209,11 +4221,20 @@ function get_real_interface($interface = "wan", $family = "all", $realv6iface = $wanif = "ppp"; break; default: - // If a real interface was alread passed simply - // pass the real interface back. This encourages - // the usage of this function in more cases so that - // we can combine logic for more flexibility. - if(does_interface_exist($interface, $flush)) { + if (substr($interface, 0, 4) == '_vip') { + $wanif = get_configured_carp_interface_list($interface, '', 'iface'); + if (!empty($wanif)) + $wanif = get_real_interface($wanif, $family); + break; + } else if (substr($interface, 0, 5) == '_lloc') { + $interface = substr($interface, 5); + } else if (does_interface_exist($interface, $flush)) { + /* + * If a real interface was alread passed simply + * pass the real interface back. This encourages + * the usage of this function in more cases so that + * we can combine logic for more flexibility. + */ $wanif = $interface; break; } @@ -4579,7 +4600,7 @@ function link_interface_to_vlans($int, $action = "") { } } -function link_interface_to_vips($int, $action = "") { +function link_interface_to_vips($int, $action = "", $vhid = '') { global $config; if (is_array($config['virtualip']['vip'])) { @@ -4588,8 +4609,10 @@ function link_interface_to_vips($int, $action = "") { if ($int == $vip['interface']) { if ($action == "update") interfaces_vips_configure($int); - else - $result[] = $vip; + else { + if (empty($vhid) || ($vhid == $vip['vhid'])) + $result[] = $vip; + } } } return $result; @@ -4788,15 +4811,60 @@ function ip_in_interface_alias_subnet($interface, $ipalias) { return false; } +function get_possible_listen_ips($include_ipv6_link_local=false) { + + $interfaces = get_configured_interface_with_descr(); + foreach ($interfaces as $iface => $ifacename) { + if ($include_ipv6_link_local) { + /* This is to avoid going though added ll below */ + if (substr($iface, 0, 5) == '_lloc') + continue; + $llip = find_interface_ipv6_ll(get_real_interface($iface)); + if (!empty($llip)) { + $interfaces["_lloc{$iface}"] = "{$ifacename} IPv6 Link-Local"; + } + } + } + /* XXX: Maybe use array_merge below? */ + $carplist = get_configured_carp_interface_list(); + foreach ($carplist as $cif => $carpip) + $interfaces[$cif] = $carpip . ' (' . get_vip_descr($carpip) . ')'; + $aliaslist = get_configured_ip_aliases_list(); + foreach ($aliaslist as $aliasip => $aliasif) + $interfaces[$aliasip] = $aliasip . ' (' . get_vip_descr($aliasip) . ')'; + + $interfaces['lo0'] = 'Localhost'; + + return $interfaces; +} + +function get_possible_traffic_source_addresses($include_ipv6_link_local=false) { + global $config; + + $sourceips = get_possible_listen_ips($include_ipv6_link_local); + foreach (array('server', 'client') as $mode) { + if (is_array($config['openvpn']["openvpn-{$mode}"])) { + foreach ($config['openvpn']["openvpn-{$mode}"] as $id => $setting) { + if (!isset($setting['disable'])) { + $vpn = array(); + $vpn['value'] = 'ovpn' . substr($mode, 0, 1) . $setting['vpnid']; + $vpn['name'] = gettext("OpenVPN") . " ".$mode.": ".htmlspecialchars($setting['description']); + $sourceips[] = $vpn; + } + } + } + } + return $sourceips; +} + function get_interface_ip($interface = "wan") { $realif = get_failover_interface($interface); - if (!$realif) { - if (strstr($interface, "_vip")) - return get_configured_carp_interface_list($interface); - else - return null; - } + if (!$realif) + return null; + + if (substr($realif, 0, 4) == '_vip') + return get_configured_carp_interface_list($realif, 'inet', 'ip'); $curip = find_interface_ip($realif); if ($curip && is_ipaddr($curip) && ($curip != "0.0.0.0")) @@ -4808,13 +4876,15 @@ function get_interface_ip($interface = "wan") { function get_interface_ipv6($interface = "wan", $flush = false) { global $config; - $realif = get_failover_interface($interface, "inet6"); - if (!$realif) { - if (strstr($interface, "_vip")) - return get_configured_carp_interface_list($interface, "inet6"); - else - return null; - } + $realif = get_failover_interface($interface, 'inet6'); + if (!$realif) + return null; + + if (substr($realif, 0, 4) == '_vip') + return get_configured_carp_interface_list($realif, 'inet6', 'ip'); + else if (substr($realif, 0, 5) == '_lloc') + return get_interface_linklocal($interface); + /* * NOTE: On the case when only the prefix is requested, @@ -4827,7 +4897,7 @@ function get_interface_ipv6($interface = "wan", $flush = false) { case 'pptp': case 'ppp': if ($config['interfaces'][$interface]['ipaddrv6'] == 'dhcp6') - $realif = get_real_interface($interface, "inet6", true); + $realif = get_real_interface($interface, 'inet6', true); break; } if (isset($config['interfaces'][$interface]['dhcp6prefixonly'])) { @@ -4846,14 +4916,14 @@ function get_interface_ipv6($interface = "wan", $flush = false) { function get_interface_linklocal($interface = "wan") { - $realif = get_failover_interface($interface, "inet6"); - if (!$realif) { - if (strstr($interface, "_vip")) { - list($interface, $vhid) = explode("_vip", $interface); - $realif = get_real_interface($interface); - } else - return null; - } + $realif = get_failover_interface($interface, 'inet6'); + if (!$realif) + return null; + + if (substr($interface, 0, 4) == '_vip') + $realif = get_real_interface($interface); + else if (substr($interface, 0, 5) == '_lloc') + $realif = get_real_interface(substr($interface, 5)); $curip = find_interface_ipv6_ll($realif); if ($curip && is_ipaddrv6($curip) && ($curip != "::")) @@ -4863,14 +4933,13 @@ function get_interface_linklocal($interface = "wan") { } function get_interface_subnet($interface = "wan") { + + if (substr($interface, 0, 4) == '_vip') + return get_configured_carp_interface_list($interface, 'inet', 'subnet'); + $realif = get_real_interface($interface); - if (!$realif) { - if (strstr($interface, "_vip")) { - list($interface, $vhid) = explode("_vip", $interface); - $realif = get_real_interface($interface); - } else - return null; - } + if (!$realif) + return null; $cursn = find_interface_subnet($realif); if (!empty($cursn)) @@ -4880,16 +4949,15 @@ function get_interface_subnet($interface = "wan") { } function get_interface_subnetv6($interface = "wan") { - global $config; - $realif = get_real_interface($interface, "inet6"); - if (!$realif) { - if (strstr($interface, "_vip")) { - list($interface, $vhid) = explode("_vip", $interface); - $realif = get_real_interface($interface); - } else - return null; - } + if (substr($interface, 0, 4) == '_vip') + return get_configured_carp_interface_list($interface, 'inet6', 'subnet'); + else if (substr($interface, 0, 5) == '_lloc') + $interface = substr($interface, 5); + + $realif = get_real_interface($interface, 'inet6'); + if (!$realif) + return null; $cursn = find_interface_subnetv6($realif); if (!empty($cursn)) @@ -5263,7 +5331,7 @@ function get_failover_interface($interface, $family = "all") { $a_groups = return_gateway_groups_array(); if (is_array($a_groups[$interface])) { /* we found a gateway group, fetch the interface or vip */ - if ($a_groups[$interface][0]['vip'] <> "") + if (!empty($a_groups[$interface][0]['vip'])) return $a_groups[$interface][0]['vip']; else return $a_groups[$interface][0]['int']; diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 1bfa1a4..a89c151 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -369,18 +369,16 @@ function convert_ip_to_network_format($ip, $subnet) { * get_carp_interface_status($carpinterface): returns the status of a carp ip */ function get_carp_interface_status($carpinterface) { - $carp_query = ""; - /* XXX: Need to fidn a better way for this! */ - list ($interface, $vhid) = explode("_vip", $carpinterface); $interface = get_real_interface($interface); - exec("/sbin/ifconfig $interface | /usr/bin/grep -v grep | /usr/bin/grep carp: | /usr/bin/grep 'vhid {$vhid}'", $carp_query); + $carp_query = ''; + $_gb = exec("/sbin/ifconfig $interface | /usr/bin/grep -v grep | /usr/bin/grep carp: | /usr/bin/head -n 1", $carp_query); foreach($carp_query as $int) { - if(stristr($int, "MASTER")) + if (stripos($int, "MASTER")) return gettext("MASTER"); - if(stristr($int, "BACKUP")) + if (stripos($int, "BACKUP")) return gettext("BACKUP"); - if(stristr($int, "INIT")) + if (stripos($int, "INIT")) return gettext("INIT"); } return; @@ -2627,7 +2625,7 @@ function is_ipaddr_configured($ipaddr, $ignore_if = "", $check_localip = false, $interface_list_vips = get_configured_vips_list(true); foreach ($interface_list_vips as $id => $vip) { /* Skip CARP interfaces here since they were already checked above */ - if ($id == $ignore_vip_id || (strstr($ignore_if, '_vip') && $ignore_vip_if == $vip['if'])) + if ($id == $ignore_vip_id || (substr($ignore_if, 0, 4) == '_vip') && substr($ignore_vip_if, 5) == $vip['uniqdid'])) continue; if (strcasecmp($ipaddr, $vip['ipaddr']) == 0) return true; diff --git a/etc/inc/services.inc b/etc/inc/services.inc index 194b4f3..ea9358a 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -1783,10 +1783,10 @@ function services_dnsmasq_configure() { } else { $if = get_real_interface($interface); if (does_interface_exist($if)) { - $laddr = find_interface_ip($if); + $laddr = get_interface_ip($interface); if (is_ipaddrv4($laddr)) $listen_addresses .= " --listen-address={$laddr} "; - $laddr6 = find_interface_ipv6($if); + $laddr6 = get_interface_ipv6($interface); if (is_ipaddrv6($laddr6) && !isset($config['dnsmasq']['strictbind'])) { /* * XXX: Since dnsmasq does not support link-local address @@ -2029,7 +2029,7 @@ EOD; } else { $if = get_real_interface($config['snmpd']['bindip']); if (does_interface_exist($if)) - $bind_to_ip = find_interface_ip($if); + $bind_to_ip = get_interface_ip($config['snmpd']['bindip']); } } diff --git a/etc/inc/system.inc b/etc/inc/system.inc index ba24c88..d40faa6 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -2060,49 +2060,4 @@ function system_get_dmesg_boot() { return file_get_contents("{$g['varlog_path']}/dmesg.boot"); } -function get_possible_listen_ips($include_ipv6_link_local=false) { - $interfaces = get_configured_interface_with_descr(); - $carplist = get_configured_carp_interface_list(); - $listenips = array(); - foreach ($carplist as $cif => $carpip) - $interfaces[$cif] = $carpip." (".get_vip_descr($carpip).")"; - $aliaslist = get_configured_ip_aliases_list(); - foreach ($aliaslist as $aliasip => $aliasif) - $interfaces[$aliasip] = $aliasip." (".get_vip_descr($aliasip).")"; - foreach ($interfaces as $iface => $ifacename) { - $tmp["name"] = $ifacename; - $tmp["value"] = $iface; - $listenips[] = $tmp; - if ($include_ipv6_link_local) { - $llip = find_interface_ipv6_ll(get_real_interface($iface)); - if (!empty($llip)) { - $tmp["name"] = "{$ifacename} IPv6 Link-Local"; - $tmp["value"] = $llip; - $listenips[] = $tmp; - } - } - } - $tmp["name"] = "Localhost"; - $tmp["value"] = "lo0"; - $listenips[] = $tmp; - return $listenips; -} - -function get_possible_traffic_source_addresses($include_ipv6_link_local=false) { - global $config; - $sourceips = get_possible_listen_ips($include_ipv6_link_local); - foreach (array('server', 'client') as $mode) { - if (is_array($config['openvpn']["openvpn-{$mode}"])) { - foreach ($config['openvpn']["openvpn-{$mode}"] as $id => $setting) { - if (!isset($setting['disable'])) { - $vpn = array(); - $vpn['value'] = 'ovpn' . substr($mode, 0, 1) . $setting['vpnid']; - $vpn['name'] = gettext("OpenVPN") . " ".$mode.": ".htmlspecialchars($setting['description']); - $sourceips[] = $vpn; - } - } - } - } - return $sourceips; -} ?> diff --git a/etc/inc/util.inc b/etc/inc/util.inc index 8e3eed7..b5b0877 100644 --- a/etc/inc/util.inc +++ b/etc/inc/util.inc @@ -953,7 +953,7 @@ function get_configured_carp_interface_list($carpinterface = '', $family = 'inet switch ($vip['mode']) { case "carp": if (!empty($carpinterface)) { - if ($carpinterface == "{$vip['interface']}_vip{$vip['vhid']}") { + if ($carpinterface == "_vip{$vip['uniqid']}") { switch ($what) { case 'subnet': if ($family == 'inet' && is_ipaddrv4($vip['subnet'])) @@ -983,7 +983,7 @@ function get_configured_carp_interface_list($carpinterface = '', $family = 'inet } } } else { - $iflist["{$vip['interface']}_vip{$vip['vhid']}"] = $vip['subnet']; + $iflist["_vip{$vip['uniqid']}"] = $vip['subnet']; } break; } diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc index 0b8dfc1..46ed338 100644 --- a/etc/inc/vpn.inc +++ b/etc/inc/vpn.inc @@ -227,7 +227,6 @@ function vpn_ipsec_configure($ipchg = false) if ($ph2ent['pinghost']) { if (!is_array($iflist)) $iflist = get_configured_interface_list(); - $viplist = get_configured_vips_list(); $srcip = null; $local_subnet = ipsec_idinfo_to_cidr($ph2ent['localid'], true, $ph2ent['mode']); if(is_ipaddrv6($ph2ent['pinghost'])) { @@ -253,6 +252,7 @@ function vpn_ipsec_configure($ipchg = false) } /* if no valid src IP was found in configured interfaces, try the vips */ if (is_null($srcip)) { + $viplist = get_configured_vips_list(); foreach ($viplist as $vip) { if (ip_in_subnet($vip['ipaddr'], $local_subnet)) { $srcip = $vip['ipaddr']; diff --git a/etc/rc.carpbackup b/etc/rc.carpbackup index 4ecd1c9..19da7a4 100755 --- a/etc/rc.carpbackup +++ b/etc/rc.carpbackup @@ -45,21 +45,26 @@ if (!strstr($argument, "@")) list($vhid, $iface) = explode("@", $argument); $friendly = convert_real_interface_to_friendly_interface_name($iface); +$friendly_descr = convert_friendly_interface_to_friendly_descr($friendly); +$vips = link_interface_to_vips($friendly, '', $vhid); $carp_iface = "{$friendly}_vip{$vhid}"; -$friendly_descr = convert_friendly_interface_to_friendly_descr($carp_iface); -$notificationmsg = sprintf('Carp cluster member "%2$s (%1$s)" has resumed the state "BACKUP" for vhid %s', $argument, $friendly_descr, $vhid); +foreach ($vips as $vip) { + $notificationmsg = sprintf('Carp cluster member "{$friendly_descr)(%2$s): {$vip['subnet']} (%1$s)" has resumed the state "BACKUP" for vhid %s', $argument, $vip['descr'], $vhid); -notify_via_smtp($notificationmsg); -notify_via_growl($notificationmsg); -log_error($notificationmsg); + notify_via_smtp($notificationmsg); + notify_via_growl($notificationmsg); + log_error($notificationmsg); +} /* Stop OpenVPN clients running on this VIP, since multiple active OpenVPN clients on a CARP cluster can be problematic. */ global $config; if (is_array($config['openvpn']) && is_array($config['openvpn']['openvpn-client'])) { foreach ($config['openvpn']['openvpn-client'] as $settings) { - if ($settings['interface'] == $carp_iface) { - log_error("Stopping OpenVPN client instance on {$friendly_descr} because of transition to CARP backup."); - openvpn_restart('client', $settings); + foreach ($vips as $vip) { + if ($settings['interface'] == "_vip{$vip['uniqid']}") { + log_error("Stopping OpenVPN client instance on {$friendly_descr} because of transition to CARP backup."); + openvpn_restart('client', $settings); + } } } } diff --git a/etc/rc.carpmaster b/etc/rc.carpmaster index 1ae652f..6e1ad61 100755 --- a/etc/rc.carpmaster +++ b/etc/rc.carpmaster @@ -45,21 +45,26 @@ if (!strstr($argument, "@")) list($vhid, $iface) = explode("@", $argument); $friendly = convert_real_interface_to_friendly_interface_name($iface); -$carp_iface = "{$friendly}_vip${vhid}"; -$friendly_descr = convert_friendly_interface_to_friendly_descr($carp_iface); -$notificationmsg = sprintf('Carp cluster member "%2$s (%1$s)" has resumed the state "MASTER" for vhid %s', $argument, $friendly_descr, $vhid); +$friendly_descr = convert_friendly_interface_to_friendly_descr($friendly); +$vips = link_interface_to_vips($friendly, '', $vhid); +$carp_iface = "{$friendly}_vip{$vhid}"; +foreach ($vips as $vip) { + $notificationmsg = sprintf('Carp cluster member "{$friendly_descr)(%2$s): {$vip['subnet']} (%1$s)" has resumed the state "MASTER" for vhid %s', $argument, $vip['descr'], $vhid); -notify_via_smtp($notificationmsg); -notify_via_growl($notificationmsg); -log_error($notificationmsg); + notify_via_smtp($notificationmsg); + notify_via_growl($notificationmsg); + log_error($notificationmsg); +} /* Start OpenVPN clients running on this VIP, since they should be in the stopped state while the VIP is CARP Backup. */ global $config; if (is_array($config['openvpn']) && is_array($config['openvpn']['openvpn-client'])) { foreach ($config['openvpn']['openvpn-client'] as $settings) { - if ($settings['interface'] == $carp_iface) { - log_error("Starting OpenVPN client instance on {$friendly_descr} because of transition to CARP master."); - openvpn_restart('client', $settings); + foreach ($vips as $vip) { + if ($settings['interface'] == "_vip{$vip['uniqid']}") { + log_error("Starting OpenVPN client instance on {$friendly_descr} because of transition to CARP master."); + openvpn_restart('client', $settings); + } } } } -- cgit v1.1