summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-11-23 12:47:27 +0000
committerErmal <eri@pfsense.org>2010-11-23 12:47:27 +0000
commit108cfddf3e133aecbe113fdf8eecfdc7fd2aab07 (patch)
tree09d2dc08769f03887502fc35534c8160b0e71cb3 /etc
parent83ae810386210eca593244035825296170281db4 (diff)
downloadpfsense-108cfddf3e133aecbe113fdf8eecfdc7fd2aab07.zip
pfsense-108cfddf3e133aecbe113fdf8eecfdc7fd2aab07.tar.gz
Ticket #1023. Correct the widget code bringing it full speed with latest carp code.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pfsense-utils.inc7
1 files changed, 2 insertions, 5 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 7ffbf24..a2cb02e 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -339,11 +339,8 @@ function convert_ip_to_network_format($ip, $subnet) {
* get_carp_interface_status($carpinterface): returns the status of a carp ip
*/
function get_carp_interface_status($carpinterface) {
- /* basically cache the contents of ifconfig statement
- to speed up this routine */
- global $carp_query;
- if($carp_query == "")
- $carp_query = split("\n", `/sbin/ifconfig $carpinterface | grep carp`);
+ $carp_query = "";
+ exec("/sbin/ifconfig $carpinterface | /usr/bin/grep -v grep | /usr/bin/grep carp:", $carp_query);
foreach($carp_query as $int) {
if(stristr($int, "MASTER"))
return "MASTER";
OpenPOWER on IntegriCloud