Skip to content

Commit 91876a2

Browse files
committed
Update network.py
1 parent 3cc683d commit 91876a2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

modules/processing/network.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,10 @@ def run(self):
789789
connection["sport"] = tcp.sport
790790
connection["dport"] = tcp.dport
791791

792+
if tcp.flags & dpkt.tcp.TH_SYN and tcp.flags & dpkt.tcp.TH_ACK:
793+
connection["src"], connection["dst"] = connection["dst"], connection["src"]
794+
connection["sport"], connection["dport"] = connection["dport"], connection["sport"]
795+
792796
if tcp.data:
793797
self._tcp_dissect(connection, tcp.data, ts)
794798
src, sport, dst, dport = connection["src"], connection["sport"], connection["dst"], connection["dport"]

0 commit comments

Comments
 (0)