summaryrefslogtreecommitdiffstats
path: root/etc/rc.carpbackup
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-01-21 14:36:38 -0200
committerRenato Botelho <garga@FreeBSD.org>2015-01-21 14:36:38 -0200
commita693440176e8bd4a783a9ccb75d2cd57629b5699 (patch)
tree60068a5afbba29d12f3a9aa3866bfc5dfca1c932 /etc/rc.carpbackup
parent89ac17e3386d81196f0515107a73894b43a96493 (diff)
downloadpfsense-a693440176e8bd4a783a9ccb75d2cd57629b5699.zip
pfsense-a693440176e8bd4a783a9ccb75d2cd57629b5699.tar.gz
When radvd is configured on a CARP interface, enable it when it is MASTER and disable when go to BACKUP. It should fix #4252
Diffstat (limited to 'etc/rc.carpbackup')
-rwxr-xr-xetc/rc.carpbackup15
1 files changed, 15 insertions, 0 deletions
diff --git a/etc/rc.carpbackup b/etc/rc.carpbackup
index 4ecd1c9..14c13c0 100755
--- a/etc/rc.carpbackup
+++ b/etc/rc.carpbackup
@@ -64,6 +64,21 @@ if (is_array($config['openvpn']) && is_array($config['openvpn']['openvpn-client'
}
}
+/* Reconfigure radvd when necessary */
+if (isset($config['dhcpdv6']) && is_array($config['dhcpdv6'])) {
+ $found = false;
+ foreach ($config['dhcpdv6'] as $dhcpv6if => $dhcpv6ifconf) {
+ if ($dhcpv6ifconf['rainterface'] != $carp_iface)
+ continue;
+
+ $found = true;
+ break;
+ }
+
+ if ($found === true)
+ services_radvd_configure();
+}
+
$pluginparams = array();
$pluginparams['type'] = 'carp';
$pluginparams['event'] = 'rc.carpbackup';
OpenPOWER on IntegriCloud