diff options
author | Chris Buechler <cmb@pfsense.org> | 2010-08-07 19:09:04 -0400 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2010-08-07 19:09:04 -0400 |
commit | 1e7fff5a7a99d99e7e7d2c6a06e3dbd8f63baa74 (patch) | |
tree | 53f22237327c1ea69aa9b1ff28a5f5288ae67e23 /etc | |
parent | 61c224334d905cb85f9fb733f392374847bb10f5 (diff) | |
download | pfsense-1e7fff5a7a99d99e7e7d2c6a06e3dbd8f63baa74.zip pfsense-1e7fff5a7a99d99e7e7d2c6a06e3dbd8f63baa74.tar.gz |
correctly use sticky and round-robin. Ticket #337
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/filter.inc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 46e50ce..3a6c37a 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -594,16 +594,16 @@ function filter_generate_gateways() { $routeto .= str_repeat("( {$int} {$gatewayip} ) ", $member['weight']); } else $routeto .= "( {$int} {$gatewayip} ) "; - $foundlb = 1; + $foundlb++; } else log_error("An error occurred while trying to find the interface got $gatewayip . The rule has not been added."); } $route = ""; if ($foundlb > 0) { $route = " route-to { {$routeto} } "; - if($idx > 1) + if($foundlb > 1) $route .= " round-robin "; - if (isset($config['system']['lb_use_sticky'])) + if ($foundlb > 1 && isset($config['system']['lb_use_sticky'])) $route .= " sticky-address "; } } |