no need to check for ovs version
After adding checks for openflow version, there is no need to check the ovs version, so that other switches supporting openflow 1.5 can also use the tcp_flags. But we also leave the ovs checks to use the flags option while ovs>=2.1.0 but openflow<1.5.
@@ -596,11 +596,11 @@ public class Forwarding extends ForwardingBase implements IFloodlightModule, IOF
if (FLOWMOD_DEFAULT_MATCH_TRANSPORT_DST) {
mb.setExact(MatchField.TCP_DST, tcp.getDestinationPort());
}
- if(sw.getOFFactory().getVersion().compareTo(OFVersion.OF_15) >= 0 &&
- sw.getSwitchDescription().getHardwareDescription().toLowerCase().contains("open vswitch") && (
+ if(sw.getOFFactory().getVersion().compareTo(OFVersion.OF_15) >= 0 ||
+ (sw.getSwitchDescription().getHardwareDescription().toLowerCase().contains("open vswitch") && (
Integer.parseInt(sw.getSwitchDescription().getSoftwareDescription().toLowerCase().split("\\.")[0]) > 2 || (
Integer.parseInt(sw.getSwitchDescription().getSoftwareDescription().toLowerCase().split("\\.")[0]) == 2 &&
- Integer.parseInt(sw.getSwitchDescription().getSoftwareDescription().toLowerCase().split("\\.")[1]) >= 1 ))
+ Integer.parseInt(sw.getSwitchDescription().getSoftwareDescription().toLowerCase().split("\\.")[1]) >= 1 )))
){
if(FLOWMOD_DEFAULT_MATCH_TCP_FLAG){
mb.setExact(MatchField.OVS_TCP_FLAGS, U16.of(tcp.getFlags()));
