diff options
author | Scott Ullrich <sullrich@sullrich-MacBookPro.local> | 2009-03-31 16:21:41 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@sullrich-MacBookPro.local> | 2009-03-31 16:21:41 -0400 |
commit | 8e9c0681aea4677e1ee81b551f8fae88a9142d20 (patch) | |
tree | 860a495d21459aa70f37f88b9e09752900231385 /etc/inc/pfsense-utils.inc | |
parent | 04d487e00e178fc4b5e478fc07aa53f550faf489 (diff) | |
download | pfsense-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/inc/pfsense-utils.inc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 2 |
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++; } |