diff options
Diffstat (limited to 'usr/local/www/carp_status.php')
-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 cbccbc6..e8e5077 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; } |