Detect TCPError/UDPerror/SCTPerror after IPv6 Extension Headers#4914
Open
guedou wants to merge 1 commit intosecdev:masterfrom
Open
Detect TCPError/UDPerror/SCTPerror after IPv6 Extension Headers#4914guedou wants to merge 1 commit intosecdev:masterfrom
guedou wants to merge 1 commit intosecdev:masterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4914 +/- ##
==========================================
- Coverage 80.84% 80.64% -0.21%
==========================================
Files 369 370 +1
Lines 90968 91737 +769
==========================================
+ Hits 73544 73981 +437
- Misses 17424 17756 +332
🚀 New features to boost your workflow:
|
guedou
commented
Feb 10, 2026
d2ada67 to
96ecc5b
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes Scapy’s IPv6-in-ICMPv6 error dissection so that when an IPerror6 payload contains IPv6 extension headers, the final L4 layer is parsed as TCPerror/UDPerror/SCTPerror (as appropriate) rather than the non-error variants (e.g., TCP).
Changes:
- Update IPv6 extension header payload guessing to return
TCPerror/UDPerror/SCTPerrorwhen anIPerror6exists in the underlayer chain. - Extend IPv6 layer UTS coverage with a regression test for
IPerror6+ IPv6 extension header +TCPerror.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
scapy/layers/inet6.py |
Adds IPerror6-aware logic in _IPv6ExtHdr.guess_payload_class() to select *error layers after IPv6 extension headers. |
test/scapy/layers/inet6.uts |
Adds a regression test ensuring TCPerror is detected behind an IPv6 Fragment extension header within an ICMPv6 error citation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
68c19a2 to
15cb41b
Compare
15cb41b to
ca622f8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4904