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

ipv6 packet with option decodes error #218

Closed
h3cnp opened this issue Jun 24, 2024 · 2 comments
Closed

ipv6 packet with option decodes error #218

h3cnp opened this issue Jun 24, 2024 · 2 comments

Comments

@h3cnp
Copy link

h3cnp commented Jun 24, 2024

Describe the bug
An IPv6 packet with option decodes error

System information
A clear and concise description of your system information.

  • OS Version: win10
  • Python Version: 3.11
  • Python Implementation: [e.g. CPython, PyPy]

Traceback stack

pcapkit.PCAPKIT_DEVMODE=True
json = pcapkit.extract(fin='ipv4_over_srv6.pcap', fout='out.json', format='json', extension=False)
[ERROR] 06/24/2024 03:36:43 PM - bad char in struct format
struct.error: bad char in struct format
[WARNING] 06/24/2024 03:36:43 PM - EOF reached

json = pcapkit.extract(fin='sbfd.pcap', fout='out.json', format='json', extension=False)
[WARNING] 06/24/2024 03:37:19 PM - EOF reached

frame.zip

Expected behavior
L4 header (e.g. UDP) or tunnel payload after IPv6 option decodes error. It looks like L4 parsing starts from the ipv6 option.
Find the example packet in the attachment.

Additional context
Add any other context about the problem here.

@JarryShaw
Copy link
Owner

It appears that the padding length of the capsulated IPv4 packet was incorrectly calculated (as -4). I'll look further into this issue.

JarryShaw added a commit that referenced this issue Nov 14, 2024
@JarryShaw
Copy link
Owner

This issue should've been fixed in PyPCAPKit 1.3.4.

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

2 participants