From 067c2ef48609ea9f8c9a00986089c4d6d9f20787 Mon Sep 17 00:00:00 2001 From: aweally <fangtuo90@gmail.com> Date: Tue, 21 Mar 2017 18:25:52 +0800 Subject: [PATCH] Update Forwarding.java --- .../floodlightcontroller/forwarding/Forwarding.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/floodlightcontroller/forwarding/Forwarding.java b/src/main/java/net/floodlightcontroller/forwarding/Forwarding.java index e999598ac..3b4bd2758 100644 --- a/src/main/java/net/floodlightcontroller/forwarding/Forwarding.java +++ b/src/main/java/net/floodlightcontroller/forwarding/Forwarding.java @@ -596,11 +596,15 @@ 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){ + if(FLOWMOD_DEFAULT_MATCH_TCP_FLAG){ + mb.setExact(MatchField.TCP_FLAGS, U16.of(tcp.getFlags())); + } + } + else if(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())); -- GitLab