summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@sullrich-MacBookPro.local>2009-03-31 16:21:41 -0400
committerScott Ullrich <sullrich@sullrich-MacBookPro.local>2009-03-31 16:21:41 -0400
commit8e9c0681aea4677e1ee81b551f8fae88a9142d20 (patch)
tree860a495d21459aa70f37f88b9e09752900231385 /etc
parent04d487e00e178fc4b5e478fc07aa53f550faf489 (diff)
downloadpfsense-8e9c0681aea4677e1ee81b551f8fae88a9142d20.zip
pfsense-8e9c0681aea4677e1ee81b551f8fae88a9142d20.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 d0d858c..50ba17f 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -1548,7 +1548,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