net: recognize bare IPv6 loopback addresses in isLoopback - #63619
net: recognize bare IPv6 loopback addresses in isLoopback#63619watilde wants to merge 2 commits into
Conversation
|
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
left a comment
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 ?
|
@Ethan-Arrowood Thanks for your comment, I've updated. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Signed-off-by: Daijiro Wachi <daijiro.wachi@gmail.com>
Signed-off-by: Daijiro Wachi <daijiro.wachi@gmail.com>
Commit Queue failedThe pull request was removed from the Commit Queue and labeled
commit-queue-failed
Full Commit Queue output |
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.