Fix property cookieMask not supported in version 1.0 issue when build delete flows in forwarding module -- try again to pass tests.
@@ -358,6 +358,15 @@ public class Forwarding extends ForwardingBase implements IFloodlightModule, IOF
} else {
ImmutableList.Builder<OFMessage> msgsBuilder = ImmutableList.builder();
for (Masked<U64> masked_cookie : masked_cookies) {
+ if (ver.compareTo(OFVersion.OF_10) == 0) {
+ msgsBuilder.add(
+ sw.getOFFactory().buildFlowDelete()
+ .setCookie(masked_cookie.getValue())
+ // maskCookie not support in OpenFlow 1.0
+ .build()
+ );
+ }
+ else {
msgsBuilder.add(
sw.getOFFactory().buildFlowDelete()
.setCookie(masked_cookie.getValue())
@@ -366,6 +375,8 @@ public class Forwarding extends ForwardingBase implements IFloodlightModule, IOF
);
}
+ }
+
List<OFMessage> msgs = msgsBuilder.build();
sw.write(msgs);
cache.put(ver, msgs);
