diff options
author | Renato Botelho <garga@FreeBSD.org> | 2015-01-21 14:36:38 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2015-01-21 14:36:38 -0200 |
commit | a693440176e8bd4a783a9ccb75d2cd57629b5699 (patch) | |
tree | 60068a5afbba29d12f3a9aa3866bfc5dfca1c932 /etc | |
parent | 89ac17e3386d81196f0515107a73894b43a96493 (diff) | |
download | pfsense-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')
-rw-r--r-- | etc/inc/services.inc | 2 | ||||
-rwxr-xr-x | etc/rc.carpbackup | 15 | ||||
-rwxr-xr-x | etc/rc.carpmaster | 15 |
3 files changed, 32 insertions, 0 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc index 72ef585..6fbc69a 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -97,6 +97,8 @@ function services_radvd_configure($blacklist = array()) { if (strstr($dhcpv6if, "_vip")) { // CARP IP, find parent + if (get_carp_interface_status($dhcpv6if) != "MASTER") + continue; $ifparent = link_carp_interface_to_parent($dhcpv6if); $realif = convert_friendly_interface_to_real_interface_name($ifparent); } else { 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'; diff --git a/etc/rc.carpmaster b/etc/rc.carpmaster index 1ae652f..4040124 100755 --- a/etc/rc.carpmaster +++ b/etc/rc.carpmaster @@ -72,6 +72,21 @@ if (is_array($config['openvpn']) && is_array($config['openvpn']['openvpn-server' } } +/* 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.carpmaster'; |