From 83942db34d72726cbb893305bf5778b6d4f3b48c Mon Sep 17 00:00:00 2001 From: aweally <fangtuo90@gmail.com> Date: Tue, 21 Mar 2017 18:01:40 +0800 Subject: [PATCH] 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. --- .../floodlightcontroller/forwarding/Forwarding.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/net/floodlightcontroller/forwarding/Forwarding.java b/src/main/java/net/floodlightcontroller/forwarding/Forwarding.java index 1e02fe4cd..e999598ac 100644 --- a/src/main/java/net/floodlightcontroller/forwarding/Forwarding.java +++ b/src/main/java/net/floodlightcontroller/forwarding/Forwarding.java @@ -596,12 +596,12 @@ 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") && ( - 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 )) - ){ + 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 ))) + ){ if(FLOWMOD_DEFAULT_MATCH_TCP_FLAG){ mb.setExact(MatchField.OVS_TCP_FLAGS, U16.of(tcp.getFlags())); } -- GitLab