summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorjim-p <jim@pingle.org>2009-03-31 16:16:01 -0400
committerjim-p <jim@pingle.org>2009-03-31 16:16:01 -0400
commit7e9547cfa035777c472ba8882e51405477afcc80 (patch)
treee52694f802cb448a08977c7d4d6306d7faf1aec1 /etc
parent70ce91629d582727ad6662441ec043466c3cdab2 (diff)
downloadpfsense-7e9547cfa035777c472ba8882e51405477afcc80.zip
pfsense-7e9547cfa035777c472ba8882e51405477afcc80.tar.gz
Improve the matching of carp ints to IPs.
Previously this stristr substring match would return incorrect/unexpected results. 10.0.0.1 would also match 10.0.0.16, 10.0.0.135. Adding a space to the IP to check will only match the specific IP given, since it is followed by spaces in the ifconfig output.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pfsense-utils.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index ac86a89..4bf8661 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -1521,7 +1521,7 @@ function find_carp_interface($ip) {
}
$carps = 0;
foreach($find_carp_ifconfig as $fci) {
- if(stristr($fci, $ip) == true)
+ if(stristr($fci, $ip . " ") == true)
return "carp{$carps}";
$carps++;
}
OpenPOWER on IntegriCloud