dns: return localhost IP directly#63368
Conversation
Signed-off-by: LiviaMedeiros <livia@cirno.name>
|
Review requested:
|
mcollina
left a comment
There was a problem hiding this comment.
We can't return an ipv6 address if we don't have the matching interface.
Also, this can be customized by the host, and I think it would be better
to leave as is.
Agreed. I think something similar can also be done within We can also make fast-path exclusively for cases where we must return only IPv4 (which would add inconsistency, i'd be -1 myself).
Not sure how spec-compliant customizations are... But if it might break on some systems, probably not worth changing it. Closing this. For future references, proper check here would be something closer to |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #63368 +/- ##
==========================================
- Coverage 90.06% 90.04% -0.02%
==========================================
Files 714 714
Lines 225522 225589 +67
Branches 42636 42662 +26
==========================================
+ Hits 203110 203128 +18
- Misses 14196 14259 +63
+ Partials 8216 8202 -14
🚀 New features to boost your workflow:
|
Fixes: #44804
Fixes: #54111
Not fully fixes yet: #50871
Partially related to: #44003
As per RFC 6761 6.3,
I think we should recognize
localhost.zone as special and return immediately, without relying ongetaddrinfo(3),/etc/hosts, etc..