diff options
author | slioch <slioch@eng-140.vyatta.com> | 2009-07-07 12:45:23 -0700 |
---|---|---|
committer | slioch <slioch@eng-140.vyatta.com> | 2009-07-07 12:45:23 -0700 |
commit | 45432c0b011ba08fa1056fddcf41fbba2adec0b2 (patch) | |
tree | ba82ed9ce38c2a4e88916d5a97413cb9d3839078 /src/lbdatafactory.cc | |
parent | 9a0717eedce98f37e2962da6104d83ceaee1f73a (diff) | |
download | vyatta-wanloadbalance-45432c0b011ba08fa1056fddcf41fbba2adec0b2.tar.gz vyatta-wanloadbalance-45432c0b011ba08fa1056fddcf41fbba2adec0b2.zip |
fix for bug 4658. Move enable-source-based-routing to per rule basis from global setting.
Conflicts:
src/lbdecision.cc
Diffstat (limited to 'src/lbdatafactory.cc')
-rw-r--r-- | src/lbdatafactory.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lbdatafactory.cc b/src/lbdatafactory.cc index 17b4260..a6c117c 100644 --- a/src/lbdatafactory.cc +++ b/src/lbdatafactory.cc @@ -123,9 +123,6 @@ LBDataFactory::process(const vector<string> &path, int depth, const string &key, if (path[0] == "disable-source-nat") { process_disablesourcenat(l_key,l_value); } - else if (path[0] == "enable-source-based-routing") { - process_enablesourcebasedrouting(l_key,l_value); - } else if (path[0] == "flush-conntrack") { process_flushconntrack(l_key,l_value); } @@ -159,6 +156,9 @@ LBDataFactory::process(const vector<string> &path, int depth, const string &key, else if (depth > 0 && path[1] == "failover") { process_rule_failover(l_key,l_value); } + else if (depth > 0 && path[1] == "enable-source-based-routing") { + process_rule_enablesourcebasedrouting(l_key,l_value); + } else { process_rule(l_key,l_value); } @@ -177,12 +177,6 @@ LBDataFactory::process_flushconntrack(const string &key, const string &value) _lb_data._flush_conntrack = true; } -void -LBDataFactory::process_enablesourcebasedrouting(const string &key, const string &value) -{ - _lb_data._enable_source_based_routing = true; -} - void LBDataFactory::process_health(const string &key, const string &value) @@ -315,6 +309,12 @@ LBDataFactory::process_rule_failover(const string &key, const string &value) } void +LBDataFactory::process_rule_enablesourcebasedrouting(const string &key, const string &value) +{ + _rule_iter->second._enable_source_based_routing = true; +} + +void LBDataFactory::process_rule_source(const string &key, const string &value) { if (key == "address") { |