Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net: prefer /etc/hosts over DNS when no /etc/nsswitch.conf is present
Do not mimic glibc behavior if /etc/nsswitch.conf is missing. This will will likely be missing on musl libc systems and glibc systems will likely always have it, resulting in localhost lookup being done over DNS rather than from /etc/hosts. Do what makes most sense rather than making any assumption about the libc. Fixes #35305 Change-Id: I20bd7e24131bba8eaa39a20c8950fe552364784d GitHub-Last-Rev: 1194098 GitHub-Pull-Request: #39685 Reviewed-on: https://go-review.googlesource.com/c/go/+/238629 Run-TryBot: Dan Peterson <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Dan Peterson <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Trust: Emmanuel Odeke <[email protected]>
- Loading branch information