summaryrefslogtreecommitdiffhomepage
path: root/table
diff options
context:
space:
mode:
authorWataru Ishida <ishida.wataru@lab.ntt.co.jp>2016-11-25 00:36:27 -0500
committerWataru Ishida <ishida.wataru@lab.ntt.co.jp>2016-11-25 00:36:27 -0500
commit9f13bbed20f6957310ef8c54c2cc3ff015274667 (patch)
treec0064211b31e59bbc19f3b1039a805a39c1f2771 /table
parentf6b384f64763f0e8631fa9a104c3410b5f841dc6 (diff)
policy: fix bug of multi policy application
when multiple policies with modification actions are configured, use a path structure which was applied to the previous policy. Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'table')
-rw-r--r--table/policy.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/table/policy.go b/table/policy.go
index aa359a4d..5916d0a3 100644
--- a/table/policy.go
+++ b/table/policy.go
@@ -2789,7 +2789,7 @@ func (r *RoutingPolicy) ApplyPolicy(id string, dir PolicyDirection, before *Path
result := ROUTE_TYPE_NONE
after := before
for _, p := range r.getPolicy(id, dir) {
- result, after = p.Apply(before, options)
+ result, after = p.Apply(after, options)
if result != ROUTE_TYPE_NONE {
break
}