scapy icon indicating copy to clipboard operation
scapy copied to clipboard

TCP out of order segments ack not received in srp1

Open imvtsl opened this issue 9 months ago • 0 comments

Brief description

When TCP segments are sent out of order, scapy's srp1() returns None for the last segment sent.

Expected behaviour: scapy's srp1() should return the ACK packet for the last segment sent as shown in packet capture.

The tcp client code, packet capture file and screenshots are in this repo for reproduction.

Scapy version

2.6.1

Python version

3.12.3

Operating system

Linux 6.8.0-54-generic

Additional environment information

No response

How to reproduce

  • Set up your own TCP server.
  • Replace dst_port, dst_ip, src_ip, src_mac, dst_mac, iface in issue.py
  • Capture on the interface using wireshark/tcpdump or any other tools of your choice.
  • run issue.py

Actual result

order_1_ack is None

Expected result

order_1_ack should not be None. It should have same contents as in the captured pcap.

Related resources

No response

imvtsl avatar Mar 17 '25 01:03 imvtsl