diff options
| author | Michael Larson <slioch@eng-140.vyatta.com> | 2008-06-10 11:05:53 -0700 |
|---|---|---|
| committer | Michael Larson <slioch@eng-140.vyatta.com> | 2008-06-10 11:05:53 -0700 |
| commit | 5510da8abc49783dc9b5b4f49577c668d3cb88fa (patch) | |
| tree | 5093b330be0eb4f3a622c5a0e108d5aaf6d54c37 /src | |
| parent | 46f998d055ee8247847b4043d30037973c6f5650 (diff) | |
| download | vyatta-wanloadbalance-5510da8abc49783dc9b5b4f49577c668d3cb88fa.tar.gz vyatta-wanloadbalance-5510da8abc49783dc9b5b4f49577c668d3cb88fa.zip | |
fix for iptables rules in tcp state. should fix main problem with wan
lb.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lbdecision.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lbdecision.cc b/src/lbdecision.cc index 005726b..c959303 100644 --- a/src/lbdecision.cc +++ b/src/lbdecision.cc @@ -169,14 +169,14 @@ LBDecision::run(LBData &lb_data) while (w_iter != w_end) { sprintf(fbuf,"%f",w_iter->second); sprintf(dbuf,"%d",w_iter->first); - execute(string("iptables -t mangle -A PREROUTING ") + app_cmd + " -m state --state NEW -m statistic --mode random --probability " + fbuf + " -j ISP_" + dbuf); + execute(string("iptables -t mangle -A PREROUTING ") + app_cmd + " -m state --state NEW,ESTABLISHED -m statistic --mode random --probability " + fbuf + " -j ISP_" + dbuf); ++w_iter; } //last one is special case, the catch all rule ++w_iter; sprintf(dbuf,"%d",w_iter->first); - execute(string("iptables -t mangle -A PREROUTING ") + app_cmd + " -m state --state NEW -j ISP_" + dbuf); + execute(string("iptables -t mangle -A PREROUTING ") + app_cmd + " -m state --state NEW,ESTABLISHED -j ISP_" + dbuf); ++iter; } } |
