Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

converting a TCP packet with SAckOK option to a byte sequence fails #239

Open
chiplukes opened this issue Feb 21, 2018 · 0 comments
Open

Comments

@chiplukes
Copy link

Here is a simple example that demonstrates this problem:

from scapy3k.all import *

# NOP option
packet = Ether()/IP()/TCP(options=[('NOP',None)])
print(packet[TCP].options) #this works
print(bytes(packet)) #this works

# SAckOK option
packet = Ether()/IP()/TCP(options=[('SAckOK',None)])
print(packet[TCP].options) #this works
print(bytes(packet)) #this breaks

This probably has something to do with the fact that the selective ACK has a length field of 2, but no data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant