Skip to content

TCP out of order segments ack not received in srp1 #4696

Open
@imvtsl

Description

@imvtsl

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions