Fixed bug where ONOS sends actions in DELETE flow mods in OF1.0.
Fixes ONOS-787. Change-Id: Ide8817927fc7a64da79df7998e3baebefb09de40 (cherry picked from commit 18679365)
Showing
2 changed files
with
7 additions
and
12 deletions
providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowModBuilderVer10.java
... | @@ -102,7 +102,6 @@ public class FlowModBuilderVer10 extends FlowModBuilder { | ... | @@ -102,7 +102,6 @@ public class FlowModBuilderVer10 extends FlowModBuilder { |
102 | 102 | ||
103 | long cookie = flowRule().id().value(); | 103 | long cookie = flowRule().id().value(); |
104 | 104 | ||
105 | - | ||
106 | OFFlowMod fm = factory().buildFlowModify() | 105 | OFFlowMod fm = factory().buildFlowModify() |
107 | .setXid(xid) | 106 | .setXid(xid) |
108 | .setCookie(U64.of(cookie)) | 107 | .setCookie(U64.of(cookie)) |
... | @@ -119,7 +118,6 @@ public class FlowModBuilderVer10 extends FlowModBuilder { | ... | @@ -119,7 +118,6 @@ public class FlowModBuilderVer10 extends FlowModBuilder { |
119 | @Override | 118 | @Override |
120 | public OFFlowDelete buildFlowDel() { | 119 | public OFFlowDelete buildFlowDel() { |
121 | Match match = buildMatch(); | 120 | Match match = buildMatch(); |
122 | - List<OFAction> actions = buildActions(); | ||
123 | 121 | ||
124 | long cookie = flowRule().id().value(); | 122 | long cookie = flowRule().id().value(); |
125 | 123 | ||
... | @@ -127,7 +125,6 @@ public class FlowModBuilderVer10 extends FlowModBuilder { | ... | @@ -127,7 +125,6 @@ public class FlowModBuilderVer10 extends FlowModBuilder { |
127 | .setXid(xid) | 125 | .setXid(xid) |
128 | .setCookie(U64.of(cookie)) | 126 | .setCookie(U64.of(cookie)) |
129 | .setBufferId(OFBufferId.NO_BUFFER) | 127 | .setBufferId(OFBufferId.NO_BUFFER) |
130 | - .setActions(actions) | ||
131 | .setMatch(match) | 128 | .setMatch(match) |
132 | .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM)) | 129 | .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM)) |
133 | .setPriority(flowRule().priority()) | 130 | .setPriority(flowRule().priority()) | ... | ... |
providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowModBuilderVer13.java
... | @@ -15,11 +15,7 @@ | ... | @@ -15,11 +15,7 @@ |
15 | */ | 15 | */ |
16 | package org.onosproject.provider.of.flow.impl; | 16 | package org.onosproject.provider.of.flow.impl; |
17 | 17 | ||
18 | -import java.util.Collections; | 18 | +import org.onlab.packet.Ip4Address; |
19 | -import java.util.LinkedList; | ||
20 | -import java.util.List; | ||
21 | -import java.util.Optional; | ||
22 | - | ||
23 | import org.onosproject.net.PortNumber; | 19 | import org.onosproject.net.PortNumber; |
24 | import org.onosproject.net.flow.FlowRule; | 20 | import org.onosproject.net.flow.FlowRule; |
25 | import org.onosproject.net.flow.TrafficTreatment; | 21 | import org.onosproject.net.flow.TrafficTreatment; |
... | @@ -29,13 +25,12 @@ import org.onosproject.net.flow.instructions.L0ModificationInstruction; | ... | @@ -29,13 +25,12 @@ import org.onosproject.net.flow.instructions.L0ModificationInstruction; |
29 | import org.onosproject.net.flow.instructions.L0ModificationInstruction.ModLambdaInstruction; | 25 | import org.onosproject.net.flow.instructions.L0ModificationInstruction.ModLambdaInstruction; |
30 | import org.onosproject.net.flow.instructions.L2ModificationInstruction; | 26 | import org.onosproject.net.flow.instructions.L2ModificationInstruction; |
31 | import org.onosproject.net.flow.instructions.L2ModificationInstruction.ModEtherInstruction; | 27 | import org.onosproject.net.flow.instructions.L2ModificationInstruction.ModEtherInstruction; |
28 | +import org.onosproject.net.flow.instructions.L2ModificationInstruction.ModMplsLabelInstruction; | ||
32 | import org.onosproject.net.flow.instructions.L2ModificationInstruction.ModVlanIdInstruction; | 29 | import org.onosproject.net.flow.instructions.L2ModificationInstruction.ModVlanIdInstruction; |
33 | import org.onosproject.net.flow.instructions.L2ModificationInstruction.ModVlanPcpInstruction; | 30 | import org.onosproject.net.flow.instructions.L2ModificationInstruction.ModVlanPcpInstruction; |
34 | -import org.onosproject.net.flow.instructions.L2ModificationInstruction.ModMplsLabelInstruction; | ||
35 | import org.onosproject.net.flow.instructions.L2ModificationInstruction.PushHeaderInstructions; | 31 | import org.onosproject.net.flow.instructions.L2ModificationInstruction.PushHeaderInstructions; |
36 | import org.onosproject.net.flow.instructions.L3ModificationInstruction; | 32 | import org.onosproject.net.flow.instructions.L3ModificationInstruction; |
37 | import org.onosproject.net.flow.instructions.L3ModificationInstruction.ModIPInstruction; | 33 | import org.onosproject.net.flow.instructions.L3ModificationInstruction.ModIPInstruction; |
38 | -import org.onlab.packet.Ip4Address; | ||
39 | import org.projectfloodlight.openflow.protocol.OFFactory; | 34 | import org.projectfloodlight.openflow.protocol.OFFactory; |
40 | import org.projectfloodlight.openflow.protocol.OFFlowAdd; | 35 | import org.projectfloodlight.openflow.protocol.OFFlowAdd; |
41 | import org.projectfloodlight.openflow.protocol.OFFlowDelete; | 36 | import org.projectfloodlight.openflow.protocol.OFFlowDelete; |
... | @@ -58,6 +53,11 @@ import org.projectfloodlight.openflow.types.VlanPcp; | ... | @@ -58,6 +53,11 @@ import org.projectfloodlight.openflow.types.VlanPcp; |
58 | import org.slf4j.Logger; | 53 | import org.slf4j.Logger; |
59 | import org.slf4j.LoggerFactory; | 54 | import org.slf4j.LoggerFactory; |
60 | 55 | ||
56 | +import java.util.Collections; | ||
57 | +import java.util.LinkedList; | ||
58 | +import java.util.List; | ||
59 | +import java.util.Optional; | ||
60 | + | ||
61 | /** | 61 | /** |
62 | * Flow mod builder for OpenFlow 1.3+. | 62 | * Flow mod builder for OpenFlow 1.3+. |
63 | */ | 63 | */ |
... | @@ -139,8 +139,6 @@ public class FlowModBuilderVer13 extends FlowModBuilder { | ... | @@ -139,8 +139,6 @@ public class FlowModBuilderVer13 extends FlowModBuilder { |
139 | public OFFlowDelete buildFlowDel() { | 139 | public OFFlowDelete buildFlowDel() { |
140 | Match match = buildMatch(); | 140 | Match match = buildMatch(); |
141 | List<OFAction> actions = buildActions(); | 141 | List<OFAction> actions = buildActions(); |
142 | - //OFInstruction writeActions = | ||
143 | - //factory().instructions().writeActions(actions); | ||
144 | 142 | ||
145 | long cookie = flowRule().id().value(); | 143 | long cookie = flowRule().id().value(); |
146 | 144 | ... | ... |
-
Please register or login to post a comment