You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Scapy LTP protocol implementation should not contain ConditionalFields CancelAckToBlockSender and CancelAckToBlockReceiver.
Scapy version
2.6.1
Python version
3.12
Operating system
Ubuntu 22.04
Additional environment information
RFC 5326, section 3.2.4 states that "The Cancel-acknowledgments (CAx) have no content." However, ConditionalFields CancelAckToBlockSender and CancelAckToBlockReceiver are defined for segments (scapy/contrib/ltp.py lines 176-179) with flags values 13 and 15 (cancel acknowledgement segments).
The result of this is:
An extra byte is appended when that type of segment is created
Scapy is unable to decode proper received CAx segments due to that byte missing.
How to reproduce
from scapy.contrib.ltp import LTP
from scapy.all import raw
cancel_segment = LTP(flags = 13, SessionOriginator = 1, SessionNumber = 2)
cancel_segment.show2()
print(f"Length of segment: {len(raw(cancel_segment))}")
Actual result
###[ LTP ]###
version = 0
flags = 0xD Cancel-acknowledgment segment to block sender
SessionOriginator= 1
SessionNumber= 2
HeaderExtensionCount= 0
TrailerExtensionCount= 0
\HeaderExtensions\
CancelAckToBlockSender= 0
\TrailerExtensions\
Length of segment: 5
Expected result
###[ LTP ]###
version = 0
flags = 0xD Cancel-acknowledgment segment to block sender
SessionOriginator= 1
SessionNumber= 2
HeaderExtensionCount= 0
TrailerExtensionCount= 0
\HeaderExtensions\
\TrailerExtensions\
Length of segment: 4
Sorry, I haven't had a chance to send a pcap. We're developing a test framework for DTN implementations that uses LTP and includes full Scapy-based implementations of BPv6, BPv7, BPSec, and other DTN-related protocols. It will eventually be released as open-source but has to be reviewed and approved first.
Brief description
The Scapy LTP protocol implementation should not contain ConditionalFields
CancelAckToBlockSender
andCancelAckToBlockReceiver
.Scapy version
2.6.1
Python version
3.12
Operating system
Ubuntu 22.04
Additional environment information
RFC 5326, section 3.2.4 states that "The Cancel-acknowledgments (CAx) have no content." However, ConditionalFields
CancelAckToBlockSender
andCancelAckToBlockReceiver
are defined for segments (scapy/contrib/ltp.py
lines 176-179) with flags values 13 and 15 (cancel acknowledgement segments).The result of this is:
How to reproduce
Actual result
Expected result
Related resources
https://www.rfc-editor.org/rfc/rfc5326.html#page-20
The text was updated successfully, but these errors were encountered: