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

VxLAN packets are two octets short. #112

Merged
merged 3 commits into from
Nov 29, 2023

Conversation

lemmy
Copy link
Contributor

@lemmy lemmy commented Nov 23, 2023

A VxLAN network identifier (VIN) is 24 bits/3 octets.

Found by assembling packets as part of 3DGen:

@lemmy ➜ /workspaces/RFC-3D (mku-tshark) $ ./validate_with_tshark.py 
Temporary directory created at: /tmp/tmptarwfqr8
Traceback (most recent call last):
  File "/workspaces/RFC-3D/./validate_with_tshark.py", line 47, in <module>
    vxlan = VXLAN(pkt_layer)
  File "/home/codespace/.python/current/lib/python3.10/site-packages/scapy/base_classes.py", line 399, in __call__
    i.__init__(*args, **kargs)
  File "/home/codespace/.python/current/lib/python3.10/site-packages/scapy/packet.py", line 165, in __init__
    self.dissect(_pkt)
  File "/home/codespace/.python/current/lib/python3.10/site-packages/scapy/packet.py", line 1029, in dissect
    s = self.do_dissect(s)
  File "/home/codespace/.python/current/lib/python3.10/site-packages/scapy/packet.py", line 986, in do_dissect
    s, fval = f.getfield(self, s)
  File "/home/codespace/.python/current/lib/python3.10/site-packages/scapy/fields.py", line 1046, in getfield
    return s[3:], self.m2i(pkt, struct.unpack(self.fmt, b"\x00" + s[:3])[0])  # noqa: E501
struct.error: unpack requires a buffer of 4 bytes

A VxLAN network identifier (VIN) is 24 bits/octets.
@tahina-pro tahina-pro merged commit 13bb84f into project-everest:master Nov 29, 2023
3 checks passed
@lemmy lemmy deleted the mku-vxlan branch November 29, 2023 16:37
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

Successfully merging this pull request may close these issues.

2 participants