diff options
author | Renato Botelho <garga@FreeBSD.org> | 2014-12-16 10:18:58 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2014-12-16 10:18:58 -0200 |
commit | 28268a4a4f1435adc9fb9c2f9b6839b89eb8724c (patch) | |
tree | bf04a81c8b637559f3c8ff2ec1d91dc81e51d2e4 | |
parent | 363a02310fc9310b15e41f19ebf12db899d44911 (diff) | |
download | pfsense-28268a4a4f1435adc9fb9c2f9b6839b89eb8724c.zip pfsense-28268a4a4f1435adc9fb9c2f9b6839b89eb8724c.tar.gz |
Teach interface_vip_bring_down() to deal with IP Alias over CARP
-rw-r--r-- | etc/inc/interfaces.inc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 733ba20..d95b6eb 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -1054,7 +1054,13 @@ function interface_reconfigure($interface = "wan", $reloadall = false) { function interface_vip_bring_down($vip) { global $g; - $vipif = get_real_interface($vip['interface']); + if (strpos($vip['interface'], '_vip')) { + $carpvip = get_configured_carp_interface_list($vip['interface'], 'inet' . (is_ipaddrv6($vip['subnet']) ? '6' : ''), 'vip'); + $iface = $carpvip['interface']; + } else + $iface = $vip['interface']; + + $vipif = get_real_interface($iface); switch ($vip['mode']) { case "proxyarp": if (file_exists("{$g['varrun_path']}/choparp_{$vipif}.pid")) |