only apply passed actions to last flowrule in p2pintent
Change-Id: I7a9fbc0c9abdd709aef22f0ccdbf6437b3d7907e
Showing
1 changed file
with
3 additions
and
1 deletions
... | @@ -93,7 +93,9 @@ public class PathIntentInstaller implements IntentInstaller<PathIntent> { | ... | @@ -93,7 +93,9 @@ public class PathIntentInstaller implements IntentInstaller<PathIntent> { |
93 | while (links.hasNext()) { | 93 | while (links.hasNext()) { |
94 | builder.matchInport(prev.port()); | 94 | builder.matchInport(prev.port()); |
95 | Link link = links.next(); | 95 | Link link = links.next(); |
96 | - TrafficTreatment treatment = builder(intent.treatment()) | 96 | + TrafficTreatment treatment = |
97 | + // if this is the last flow rule, apply the intent's treatments | ||
98 | + (links.hasNext() ? builder() : builder(intent.treatment())) | ||
97 | .setOutput(link.src().port()).build(); | 99 | .setOutput(link.src().port()).build(); |
98 | 100 | ||
99 | FlowRule rule = new DefaultFlowRule(link.src().deviceId(), | 101 | FlowRule rule = new DefaultFlowRule(link.src().deviceId(), | ... | ... |
-
Please register or login to post a comment