/ go Public
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse the repository at this point in the history
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@example.com> TryBot-Result: Go Bot <firstname.lastname@example.org> Reviewed-by: Dan Peterson <email@example.com> Reviewed-by: Ian Lance Taylor <firstname.lastname@example.org> Trust: Emmanuel Odeke <email@example.com>
- Loading branch information
Showing 2 changed files with 10 additions and 8 deletions.