summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorslioch <slioch@eng-140.vyatta.com>2008-08-26 17:59:34 -0700
committerslioch <slioch@eng-140.vyatta.com>2008-08-26 17:59:34 -0700
commit34ed187dafc9cd9fbda7b7eefc111bb58159c47b (patch)
treee64fb1cb6f116b9aa6fc9cce6499611d83658b63 /src
parentc1ef164982868d24c9b1c9f45b4cc7442e4150bd (diff)
downloadvyatta-wanloadbalance-34ed187dafc9cd9fbda7b7eefc111bb58159c47b.tar.gz
vyatta-wanloadbalance-34ed187dafc9cd9fbda7b7eefc111bb58159c47b.zip
fix for bug 3621.
Diffstat (limited to 'src')
-rw-r--r--src/lbdecision.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lbdecision.cc b/src/lbdecision.cc
index 315516c..977d09a 100644
--- a/src/lbdecision.cc
+++ b/src/lbdecision.cc
@@ -416,13 +416,14 @@ LBDecision::get_application_cmd(LBRule &rule)
}
if (rule._d_addr.empty() == false) {
+ string negation;
string tmp(rule._d_addr);
if (tmp.find("!") != string::npos) {
- tmp = "! " + tmp.substr(1,tmp.length()-1);
+ negation = "! ";
}
if (tmp.find("-") != string::npos) {
- filter += "-m iprange --dst-range " + tmp + " ";
+ filter += "-m iprange " + negation + "--dst-range " + tmp + " ";
}
else {
filter += "--destination " + tmp + " ";