diff options
author | Luiz Otavio O Souza <luiz@netgate.com> | 2016-11-06 21:18:16 -0600 |
---|---|---|
committer | Luiz Otavio O Souza <luiz@netgate.com> | 2016-11-06 21:18:16 -0600 |
commit | a227ecef28f4624f777b2d3761fa62bc9135c170 (patch) | |
tree | 79a363ef77efd1d5108a9d44abeffc4d3aa5b858 /src | |
parent | 068ec0b175a1f85fc9a12b084f61047830b75878 (diff) | |
parent | 5116a8aa60ad87c0a47aafeca422cc323147ea14 (diff) | |
download | pfsense-a227ecef28f4624f777b2d3761fa62bc9135c170.zip pfsense-a227ecef28f4624f777b2d3761fa62bc9135c170.tar.gz |
Merge pull request #3164 from fredronnv/master
* 'master' of https://github.com/fredronnv/pfsense:
Fix bug where CARP vip status is incorrent in the interface when more than one CARP vip is configured for an interface.
Diffstat (limited to 'src')
-rw-r--r-- | src/etc/inc/pfsense-utils.inc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/etc/inc/pfsense-utils.inc b/src/etc/inc/pfsense-utils.inc index 1c2a472..1d367eb 100644 --- a/src/etc/inc/pfsense-utils.inc +++ b/src/etc/inc/pfsense-utils.inc @@ -629,8 +629,11 @@ function get_carp_interface_status($carpid) { $interface = get_real_interface($carpiface); if ($interface == NULL) return ""; + $vip = get_configured_vip($carpid); + if ($vip == NULL || !isset($vip['vhid'])) + return ""; - $vhid = $carp['vhid']; + $vhid = $vip['vhid']; $carp_query = ''; $_gb = exec("/sbin/ifconfig $interface | /usr/bin/grep carp: | /usr/bin/grep \"vhid $vhid\"", $carp_query); foreach ($carp_query as $int) { |