-
Notifications
You must be signed in to change notification settings - Fork 423
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
Check IPv6 address after processing HBH #861
Merged
Merged
Conversation
This file contains 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
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #861 +/- ##
==========================================
- Coverage 79.74% 79.74% -0.01%
==========================================
Files 78 78
Lines 28131 28165 +34
==========================================
+ Hits 22433 22459 +26
- Misses 5698 5706 +8 ☔ View full report in Codecov by Sentry. |
@thvdveld Unfortunately this PR deals squarely with the bits of IPv6 I do not have a good understanding of. |
@whitequark no problem! |
thvdveld
force-pushed
the
check-ipv6-address
branch
2 times, most recently
from
December 1, 2023 12:39
b2bc796
to
c69e04b
Compare
has_multicast_group was only used for IPv4 with IGMP. However, this is also needed for IPv6, where we check the ALL_NODES, ALL_RPL_NODES and the solicited multicast addresses. In case of IPv4, when the `proto-igmp` feature is not enabled, this function will return false.
With IPv6, the hop-by-hop option should be checked allong every node on the route. Only then the IPv6 destination address is checked. ip(hbh): return Param Problem for some options For some options, a ICMP parameter problem needs to be transmitted back to the source.
thvdveld
force-pushed
the
check-ipv6-address
branch
from
December 13, 2023 13:23
c69e04b
to
1001586
Compare
Dirbaio
approved these changes
Dec 23, 2023
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.
Now, the destination address of the IP packet is checked if it is part of the interface addresses or the multicast addresses, only after processing the hop-by-hop header, as this header must be processed by every node.
has_multicast_group
function to also check IPv6 multicast addresses, such as the ALL_NODES, ALL_RPL_NODES (only when using RPL) and the IPv6 solicited address.RFC8200 Section 4 says the following about hop-by-hop headers:
Therefore, when an hop-by-hop extension is present, we should process it. Then we check if the packet reached its destination. If not, we discard the packet if we are not using a routing protocol. In case of RPL, we route the packet to the correct next node.