From 6d270ac4ac5d9ba77e38e268c06d53fbd1b0f87a Mon Sep 17 00:00:00 2001
From: Frank Sigalas <antonios.sigalas@nokia.com>
Date: Mon, 3 Apr 2017 18:40:21 +0300
Subject: [PATCH] Issue #593

---
 scapy/contrib/openflow.py  | 2 +-
 scapy/contrib/openflow3.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scapy/contrib/openflow.py b/scapy/contrib/openflow.py
index dd11630a..62c0f031 100755
--- a/scapy/contrib/openflow.py
+++ b/scapy/contrib/openflow.py
@@ -1183,7 +1183,7 @@ ofpt_cls = {  0: OFPTHello,
 TCP_guess_payload_class_copy = TCP.guess_payload_class
 
 def OpenFlow(self, payload):
-    if self is None or self.dport == 6653 or self.dport == 6633 or self.sport == 6653 or self.sport == 6653:
+    if self is None or self.dport == 6653 or self.dport == 6633 or self.sport == 6653 or self.sport == 6633:
     # port 6653 has been allocated by IANA, port 6633 should no longer be used
     # OpenFlow function may be called with None self in OFPPacketField
         of_type = ord(payload[1])
diff --git a/scapy/contrib/openflow3.py b/scapy/contrib/openflow3.py
index 48f83b4d..a7ea3fa6 100755
--- a/scapy/contrib/openflow3.py
+++ b/scapy/contrib/openflow3.py
@@ -3348,7 +3348,7 @@ ofpt_cls = {  0: OFPTHello,
 TCP_guess_payload_class_copy = TCP.guess_payload_class
 
 def OpenFlow(self, payload):
-    if self is None or self.dport == 6653 or self.dport == 6633 or self.sport == 6653 or self.sport == 6653:
+    if self is None or self.dport == 6653 or self.dport == 6633 or self.sport == 6653 or self.sport == 6633:
     # port 6653 has been allocated by IANA, port 6633 should no longer be used
     # OpenFlow function may be called with None self in OFPPacketField
         of_type = ord(payload[1])
-- 
GitLab