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

Improves ipv6 header parsing #1323

Merged
merged 1 commit into from
Feb 4, 2025
Merged

Improves ipv6 header parsing #1323

merged 1 commit into from
Feb 4, 2025

Conversation

nbrownus
Copy link
Collaborator

  • Handle both types of header lengths standard ipv6 and IPSec AH
  • Deal with fragments in the same way as the ipv4 path (first fragment knows the protocol, 2nd fragment gets marked as a fragment)
  • Use fixed error types to avoid the heap allocation on error
  • Improves test coverage for parseV6

Notably this also removes the header processing limit. The prior limit of 24 was an arbitrary choice and I was unable to determine a defensible limit. Worst case scenario we walk the total size of the packet 8 bytes at a time.

I included a benchmark to show how long a typical packet will take to process and how long a packet with 200 HopByHop headers would take.

@nbrownus nbrownus merged commit fbff6a1 into cert-v2 Feb 4, 2025
10 checks passed
@nbrownus nbrownus deleted the cert-v2-parseV6 branch February 4, 2025 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants