fix ICMPv6 error message handling and reporting#391
Merged
auerswal merged 1 commit intoschweikert:developfrom Jul 13, 2025
Merged
fix ICMPv6 error message handling and reporting#391auerswal merged 1 commit intoschweikert:developfrom
auerswal merged 1 commit intoschweikert:developfrom
Conversation
Collaborator
|
I'm still testing |
gsnw-sebast
approved these changes
Jun 6, 2025
Collaborator
gsnw-sebast
left a comment
There was a problem hiding this comment.
First of all, all standard tests are run. The code also looks good. Unfortunately, producing certain errors is not so easy.
Handling of received ICMPv6 messages different from Echo Reply was based on IPv4 code. It would thus use a too small minimum size, and interpret the wrong data as ICMPv6 fields. Thus received ICMPv6 error messages were either not reported at all, or were reported incorrectly. This commit introduces the following changes to fix this and thus address GitHub issue schweikert#390: - Filter out irrelevant ICMPv6 messages: fping needs to receive ICMPv6 Echo Reply and ICMPv6 error messages, nothing else (only relevant for raw sockets). - Fix offset calculation to look at the included packet that caused this ICMPv6 error message. - Ignore invoking packets that do not have ICMPv6 as the first IPv6 Next Header in the packet (there could be, e.g., IPv6 Extension Headers). - Fix ICMPv6 message type determination, and print respective warning messages.
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.
Handling of received ICMPv6 messages different from Echo Reply was based on IPv4 code. It would thus use a too small minimum size, and interpret the wrong data as ICMPv6 fields. Thus received ICMPv6 error messages were either not reported at all, or were reported incorrectly.
This commit introduces the following changes to fix this and thus address GitHub issue #390: