Bring back radvd start/stop to carpmaster/backup. Ticket #6043

This commit is contained in:
Chris Buechler 2016-03-29 23:58:42 -05:00
parent c050967416
commit fcac6e8739
2 changed files with 32 additions and 0 deletions

View File

@ -98,6 +98,22 @@ if (is_array($config['openvpn']) && is_array($config['openvpn']['openvpn-server'
}
}
/* Reconfigure radvd when necessary */
if (isset($config['dhcpdv6']) && is_array($config['dhcpdv6'])) {
$rafound = false;
foreach ($config['dhcpdv6'] as $dhcpv6if => $dhcpv6ifconf) {
foreach ($vips as $vip) {
if ($dhcpv6ifconf['rainterface'] == "_vip{$vip['uniqid']}") {
log_error("Stopping radvd instance on {$friendly_descr} because of transition to CARP master.");
$rafound = true;
}
}
}
if ($rafound) {
services_radvd_configure();
}
}
$pluginparams = array();
$pluginparams['type'] = 'carp';
$pluginparams['event'] = 'rc.carpbackup';

View File

@ -97,6 +97,22 @@ if (is_array($config['openvpn']) && is_array($config['openvpn']['openvpn-server'
}
}
/* Reconfigure radvd when necessary */
if (isset($config['dhcpdv6']) && is_array($config['dhcpdv6'])) {
$rafound = false;
foreach ($config['dhcpdv6'] as $dhcpv6if => $dhcpv6ifconf) {
foreach ($vips as $vip) {
if ($dhcpv6ifconf['rainterface'] == "_vip{$vip['uniqid']}") {
log_error("Starting radvd instance on {$friendly_descr} because of transition to CARP master.");
$rafound = true;
}
}
}
if ($rafound) {
services_radvd_configure();
}
}
$pluginparams = array();
$pluginparams['type'] = 'carp';
$pluginparams['event'] = 'rc.carpmaster';