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

gopacket broken layer parsing in IP-in-IP (protocol 4) packets #13

Open
markzz opened this issue Apr 7, 2023 · 1 comment
Open

gopacket broken layer parsing in IP-in-IP (protocol 4) packets #13

markzz opened this issue Apr 7, 2023 · 1 comment
Assignees

Comments

@markzz
Copy link
Member

markzz commented Apr 7, 2023

gopacket reads the second IPv4 layer always and this causes a few interesting cases

Case 1: The packet is fine, so gopacket reports the inner packet's source IP.
Case 2: The packet is malformed, so gopacket just barrels on through and reads the packet anyways as if it were correct (which creates some rather "interesting" results)

gopacket's decode function is not obvious and causes issues and may need some major rework.

There are two approaches, fix this or throw out every packet that has protocol type 4.

@markzz
Copy link
Member Author

markzz commented Apr 17, 2023

623c7e2 fixes this.

@markzz markzz self-assigned this Apr 17, 2023
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