commit | 5c05f861541f0b8907fb74d931e90748afbf21dc | [log] [tgz] |
---|---|---|
author | alshabib <alshabibi.ali@gmail.com> | Wed Nov 19 18:28:37 2014 -0800 |
committer | alshabib <alshabibi.ali@gmail.com> | Wed Nov 19 18:31:53 2014 -0800 |
tree | 73b04a8643bd94ca653df09f2914dd07568e19be | |
parent | b2cfc38ccd59fa0e19f8a068a755ad0892539c93 [diff] |
only apply passed actions to last flowrule in p2pintent Change-Id: I7a9fbc0c9abdd709aef22f0ccdbf6437b3d7907e
diff --git a/core/net/src/main/java/org/onlab/onos/net/intent/impl/PathIntentInstaller.java b/core/net/src/main/java/org/onlab/onos/net/intent/impl/PathIntentInstaller.java index c4582c4..8208c9c 100644 --- a/core/net/src/main/java/org/onlab/onos/net/intent/impl/PathIntentInstaller.java +++ b/core/net/src/main/java/org/onlab/onos/net/intent/impl/PathIntentInstaller.java
@@ -93,7 +93,9 @@ while (links.hasNext()) { builder.matchInport(prev.port()); Link link = links.next(); - TrafficTreatment treatment = builder(intent.treatment()) + TrafficTreatment treatment = + // if this is the last flow rule, apply the intent's treatments + (links.hasNext() ? builder() : builder(intent.treatment())) .setOutput(link.src().port()).build(); FlowRule rule = new DefaultFlowRule(link.src().deviceId(),