]> Cypherpunks repositories - gostls13.git/commit
net: add support for /etc/hosts aliases using go resolver
authorMateusz Poliwczak <mpoliwczak34@gmail.com>
Thu, 10 Nov 2022 18:07:57 +0000 (18:07 +0000)
committerGopher Robot <gobot@golang.org>
Thu, 10 Nov 2022 18:29:14 +0000 (18:29 +0000)
commitd931b3b771ebd9cc0f77d3a002ff6cfb9f4d9c8b
tree637979ad8c9c4c2dcee6ddca53a49a79b4291e97
parentfd0c0db4a411eae0483d1cb141e801af401e43d3
net: add support for /etc/hosts aliases using go resolver

It adds support for /etc/hosts aliases and fixes the difference between the glibc cgo and the go DNS resolver.
Examples: https://pastebin.com/Fv6UcAVr

Fixes #44741

Change-Id: I98c484fced900731fbad800278b296028a45f044
GitHub-Last-Rev: 3d47e44f11c350df906d0c986e41891dd6e8d929
GitHub-Pull-Request: golang/go#51004
Reviewed-on: https://go-review.googlesource.com/c/go/+/382996
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/net/dnsclient_unix.go
src/net/dnsclient_unix_test.go
src/net/hosts.go
src/net/hosts_test.go
src/net/testdata/aliases [new file with mode: 0644]