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

Update inet6.py for Destination Option #4695

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arnavdas88
Copy link

Extension Headers can show weird behavious. Linux's sk_buff considers the IPv6 Payload to be either TCP, UDP or ICMP. It does not consider Extension Headers to be the payload.

Following similar architecture, This small modification let's packet flow with Destination Option on both, request and response packets be captured as well, which was not the case before, as a packet flow with DestOpt ExtHdr in both request and response will be skipped by the previously implemented logic.

No current GitHub issue exists, because there are no publicly available PDM (RFC8250) Server available, and for the same reason, the Unit Tests are not relevent.

Checklist:

  • If you are new to Scapy: I have checked CONTRIBUTING.md (esp. section submitting-pull-requests)
  • I squashed commits belonging together
  • I added unit tests or explained why they are not relevant
  • I executed the regression tests (using cd test && ./run_tests or tox)
  • If the PR is still not finished, please create a Draft Pull Request

Extension Headers can show weird behavious. Linux's sk_buff considers the IPv6 Payload to be either TCP, UDP or ICMP. It does not consider Extension Headers to be the payload.

Following similar architecture, This small modification let's packet flow with Destination Option on both, request and response packets be captured as well.
@guedou
Copy link
Member

guedou commented Mar 16, 2025

Thanks for this PR! This looks good to me.

Could you add corresponding unit tests into https://github.com/secdev/scapy/edit/master/test/scapy/layers/inet6.uts ? This will ensure that your code works as expected, and catch future regressions.

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