net: recognize bare IPv6 loopback addresses in isLoopback#63619
Open
watilde wants to merge 2 commits into
Open
net: recognize bare IPv6 loopback addresses in isLoopback#63619watilde wants to merge 2 commits into
watilde wants to merge 2 commits into
Conversation
Collaborator
|
Review requested:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #63619 +/- ##
=======================================
Coverage 90.14% 90.14%
=======================================
Files 741 741
Lines 242133 242135 +2
Branches 45568 45559 -9
=======================================
+ Hits 218265 218269 +4
+ Misses 15371 15364 -7
- Partials 8497 8502 +5
🚀 New features to boost your workflow:
|
Ethan-Arrowood
approved these changes
May 28, 2026
Ethan-Arrowood
left a comment
Contributor
There was a problem hiding this comment.
I believe this change is a valid patch. Can you update the PR description? And maybe add some cases to th eloopbackNot array like ::2 and 0:0:0:0:0:0:0:2 ?
Member
Author
|
@Ethan-Arrowood Thanks for your comment, I've updated. |
Collaborator
Collaborator
Signed-off-by: Daijiro Wachi <daijiro.wachi@gmail.com>
Signed-off-by: Daijiro Wachi <daijiro.wachi@gmail.com>
jasnell
approved these changes
Jul 21, 2026
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.
isLoopback() only matched bracket-wrapped IPv6 loopback addresses ([::1], [0:0:0:0:0:0:0:1]), but not the bare forms (::1, 0:0:0:0:0:0:0:1) that can appear when callers strip the brackets before passing the host string.
This change adds the two bare forms to the check so isLoopback returns true regardless of whether the IPv6 address is bracket-wrapped or not.