openvpn: allow "_vip" devices to reload as well

This commit is contained in:
Franco Fichtner 2019-04-28 16:50:40 +02:00
parent 666e0d31a2
commit 4e0bd7c3e3
2 changed files with 3 additions and 3 deletions

View File

@ -1195,7 +1195,7 @@ function openvpn_configure_do($verbose = false, $interface = '', $device_only =
if (!empty($interface)) {
/* protect reload by ignoring unassociated devices */
$realif = get_real_interface($interface);
if (substr($realif, 0, 4) != 'ovpn') {
if (!strstr($realif, 'ovpn') && strstr($realif, '_vip')) {
return;
}

View File

@ -49,8 +49,8 @@ list ($vhid, $iface) = explode('@', $subsystem);
$friendly = convert_real_interface_to_friendly_interface_name($iface);
$carp_iface = "{$friendly}_vip{$vhid}";
$friendly_descr = convert_friendly_interface_to_friendly_descr($carp_iface);
$descr = convert_friendly_interface_to_friendly_descr($carp_iface);
log_error(sprintf('Carp cluster member "%s (%s)" has resumed the state "%s" for vhid %s', $friendly_descr, $subsystem, $type, $vhid));
log_error(sprintf('Carp cluster member "%s (%s)" has resumed the state "%s" for vhid %s', $descr, $subsystem, $type, $vhid));
openvpn_configure_do(false, $carp_iface, true);