Merge e3cffd6cef - Properly remove IPv6 carp vips as reported from https://forum.pfsense.org/index.php?topic=84392.0

This commit is contained in:
Ermal LUÇI 2014-11-21 11:20:46 +01:00
parent c1a50dd741
commit e5e16cfc96
1 changed files with 7 additions and 2 deletions

View File

@ -1167,8 +1167,13 @@ function interface_vip_bring_down($vip) {
break;
case "carp":
$vipif = "{$vip['interface']}_vip{$vip['vhid']}";
if (does_interface_exist($vipif))
pfSense_interface_destroy($vipif);
/* XXX: Is enough to delete ip address? */
if (does_interface_exist($vipif)) {
if (is_ipaddrv6($vip['subnet']))
mwexec("/sbin/ifconfig {$vipif} inet6 " . escapeshellarg($vip['subnet']) . " delete");
else
pfSense_interface_deladdress($vipif, $vip['subnet']);
}
break;
}
}