Committed by
Gerrit Code Review
fixing vlan_push in 1.0 environments, ie. it does nothing
Change-Id: Ia29c9ef3d93d40216c90a6c7e89c7fb2125ce55b
Showing
1 changed file
with
11 additions
and
2 deletions
providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowModBuilderVer10.java
| ... | @@ -135,6 +135,7 @@ public class FlowModBuilderVer10 extends FlowModBuilder { | ... | @@ -135,6 +135,7 @@ public class FlowModBuilderVer10 extends FlowModBuilder { |
| 135 | 135 | ||
| 136 | private List<OFAction> buildActions() { | 136 | private List<OFAction> buildActions() { |
| 137 | List<OFAction> acts = new LinkedList<>(); | 137 | List<OFAction> acts = new LinkedList<>(); |
| 138 | + OFAction act; | ||
| 138 | if (treatment == null) { | 139 | if (treatment == null) { |
| 139 | return acts; | 140 | return acts; |
| 140 | } | 141 | } |
| ... | @@ -144,10 +145,16 @@ public class FlowModBuilderVer10 extends FlowModBuilder { | ... | @@ -144,10 +145,16 @@ public class FlowModBuilderVer10 extends FlowModBuilder { |
| 144 | log.warn("Saw drop action; assigning drop action"); | 145 | log.warn("Saw drop action; assigning drop action"); |
| 145 | return Collections.emptyList(); | 146 | return Collections.emptyList(); |
| 146 | case L2MODIFICATION: | 147 | case L2MODIFICATION: |
| 147 | - acts.add(buildL2Modification(i)); | 148 | + act = buildL2Modification(i); |
| 149 | + if (act != null) { | ||
| 150 | + acts.add(buildL2Modification(i)); | ||
| 151 | + } | ||
| 148 | break; | 152 | break; |
| 149 | case L3MODIFICATION: | 153 | case L3MODIFICATION: |
| 150 | - acts.add(buildL3Modification(i)); | 154 | + act = buildL3Modification(i); |
| 155 | + if (act != null) { | ||
| 156 | + acts.add(buildL3Modification(i)); | ||
| 157 | + } | ||
| 151 | break; | 158 | break; |
| 152 | case OUTPUT: | 159 | case OUTPUT: |
| 153 | OutputInstruction out = (OutputInstruction) i; | 160 | OutputInstruction out = (OutputInstruction) i; |
| ... | @@ -209,6 +216,8 @@ public class FlowModBuilderVer10 extends FlowModBuilder { | ... | @@ -209,6 +216,8 @@ public class FlowModBuilderVer10 extends FlowModBuilder { |
| 209 | return factory().actions().setVlanPcp(VlanPcp.of(vlanPcp.vlanPcp())); | 216 | return factory().actions().setVlanPcp(VlanPcp.of(vlanPcp.vlanPcp())); |
| 210 | case VLAN_POP: | 217 | case VLAN_POP: |
| 211 | return factory().actions().stripVlan(); | 218 | return factory().actions().stripVlan(); |
| 219 | + case VLAN_PUSH: | ||
| 220 | + return null; | ||
| 212 | default: | 221 | default: |
| 213 | log.warn("Unimplemented action type {}.", l2m.subtype()); | 222 | log.warn("Unimplemented action type {}.", l2m.subtype()); |
| 214 | break; | 223 | break; | ... | ... |
-
Please register or login to post a comment