diff options
author | Renato Botelho <garga@FreeBSD.org> | 2015-01-22 10:01:19 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2015-01-22 10:02:17 -0200 |
commit | 9b527a7931795466ab7286f0caadd7bef082d002 (patch) | |
tree | e8c1e05a88331d1654d7aab77bcc245c62416907 | |
parent | 91729b57f170c1a978e9829b5adc29655195d80f (diff) | |
download | pfsense-9b527a7931795466ab7286f0caadd7bef082d002.zip pfsense-9b527a7931795466ab7286f0caadd7bef082d002.tar.gz |
Make sure radvd is reconfigured when CARP is enabled/disabled. It should fix #4252
-rw-r--r-- | usr/local/www/carp_status.php | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/usr/local/www/carp_status.php b/usr/local/www/carp_status.php index 2a338b2..1a3df8a 100644 --- a/usr/local/www/carp_status.php +++ b/usr/local/www/carp_status.php @@ -60,11 +60,28 @@ if($_POST['disablecarp'] <> "") { set_single_sysctl('net.inet.carp.allow', '0'); if(is_array($config['virtualip']['vip'])) { $viparr = &$config['virtualip']['vip']; + $found_dhcpdv6 = false; foreach ($viparr as $vip) { + $carp_iface = "{$vip['interface']}_vip{$vip['vhid']}"; switch ($vip['mode']) { case "carp": interface_vip_bring_down($vip); - interface_ipalias_cleanup("{$vip['interface']}_vip{$vip['vhid']}"); + interface_ipalias_cleanup($carp_iface); + + /* + * Reconfigure radvd when necessary + * XXX: Is it the best way to do it? + */ + if (isset($config['dhcpdv6']) && is_array($config['dhcpdv6'])) { + foreach ($config['dhcpdv6'] as $dhcpv6if => $dhcpv6ifconf) { + if ($dhcpv6ifconf['rainterface'] != $carp_iface) + continue; + + services_radvd_configure(); + break; + } + } + sleep(1); break; } |