From 34ed187dafc9cd9fbda7b7eefc111bb58159c47b Mon Sep 17 00:00:00 2001 From: slioch Date: Tue, 26 Aug 2008 17:59:34 -0700 Subject: fix for bug 3621. --- src/lbdecision.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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 + " "; -- cgit v1.2.3