summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2010-07-15 12:53:13 -0400
committerScott Ullrich <sullrich@pfsense.org>2010-07-15 12:53:20 -0400
commit47a5384dd3ec8c2a2a6fc237f0b7f5482110a39d (patch)
treec86c09af382f6e148acf0cc8aea4ced9a78e2ed9
parent7d906758d5033a54b77ab61cd0e0a72120eb4f52 (diff)
downloadpfsense-47a5384dd3ec8c2a2a6fc237f0b7f5482110a39d.zip
pfsense-47a5384dd3ec8c2a2a6fc237f0b7f5482110a39d.tar.gz
Allow sticky-connections to work again. Ticket #337
-rw-r--r--etc/inc/filter.inc35
1 files changed, 17 insertions, 18 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 4135d31..af4619d 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -575,29 +575,28 @@ function filter_generate_gateways() {
if (count($members) > 0) {
$foundlb = 0;
$routeto = "";
- foreach($members as $idx => $member) {
- $int = $member['int'];
- $gatewayip = $member['gwip'];
- if (($int <> "") && is_ipaddr($gatewayip)) {
- if ($g['debug'])
- log_error("Setting up route with {$gatewayip} om $int");
+ foreach($members as $idx => $member) {
+ $int = $member['int'];
+ $gatewayip = $member['gwip'];
+ if (($int <> "") && is_ipaddr($gatewayip)) {
+ if ($g['debug'])
+ log_error("Setting up route with {$gatewayip} om $int");
if ($member['weight'] > 1) {
$routeto .= str_repeat("( {$int} {$gatewayip} ) ", $member['weight']);
} else
- $routeto .= "( {$int} {$gatewayip} ) ";
+ $routeto .= "( {$int} {$gatewayip} ) ";
$foundlb = 1;
- } 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) {
- $route .= " round-robin ";
- if (isset($config['system']['lb_use_sticky']))
- $route .= " sticky-address ";
+ } 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)
+ $route .= " round-robin ";
+ if (isset($config['system']['lb_use_sticky']))
+ $route .= " sticky-address ";
+ }
}
$rules .= "GW{$gateway} = \" {$route} \"\n";
}
OpenPOWER on IntegriCloud