commit | 60db97769ccd28ea8453f80596fd03818deded99 | [log] [tgz] |
---|---|---|
author | HIGUCHI Yuta <y-higuchi@ak.jp.nec.com> | Wed Aug 26 17:49:34 2015 -0700 |
committer | Gerrit Code Review <gerrit@onlab.us> | Thu Aug 27 23:08:00 2015 +0000 |
tree | 67d6895f492b4e05ea3b189def799df2c4c7fa62 | |
parent | f6d16761030f56ef7fc03a9a094c81a11521f796 [diff] |
BugFix: Comparing MplsLabel against int - MplsCriterion#label() returns MplsLabel, while ModMplsLabelInstruction#label() returns int Change-Id: Ia0d57651fd3553ffb4e4f07dc51c420a09028f6e
diff --git a/core/api/src/main/java/org/onosproject/net/flow/instructions/L2ModificationInstruction.java b/core/api/src/main/java/org/onosproject/net/flow/instructions/L2ModificationInstruction.java index cf6a1a2..b4ec0d3 100644 --- a/core/api/src/main/java/org/onosproject/net/flow/instructions/L2ModificationInstruction.java +++ b/core/api/src/main/java/org/onosproject/net/flow/instructions/L2ModificationInstruction.java
@@ -342,10 +342,15 @@ this.mplsLabel = mplsLabel; } + // might want to deprecate this in the long run public Integer label() { return mplsLabel.toInt(); } + public MplsLabel mplsLabel() { + return mplsLabel; + } + @Override public L2SubType subtype() { return L2SubType.MPLS_LABEL;
diff --git a/core/net/src/main/java/org/onosproject/net/flowobjective/impl/composition/FlowObjectiveCompositionUtil.java b/core/net/src/main/java/org/onosproject/net/flowobjective/impl/composition/FlowObjectiveCompositionUtil.java index 0cc383b..4ac1607 100644 --- a/core/net/src/main/java/org/onosproject/net/flowobjective/impl/composition/FlowObjectiveCompositionUtil.java +++ b/core/net/src/main/java/org/onosproject/net/flowobjective/impl/composition/FlowObjectiveCompositionUtil.java
@@ -252,7 +252,7 @@ case MPLS_LABEL: if (criterionMap.containsKey(Criterion.Type.MPLS_LABEL)) { if (((MplsCriterion) criterionMap.get((Criterion.Type.MPLS_LABEL))).label() - .equals(((L2ModificationInstruction.ModMplsLabelInstruction) l2).label())) { + .equals(((L2ModificationInstruction.ModMplsLabelInstruction) l2).mplsLabel())) { criterionMap.remove(Criterion.Type.ETH_DST); } else { return null;