diff options
author | Rich Felker <dalias@aerifal.cx> | 2020-08-05 21:35:00 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2020-08-05 21:35:00 -0400 |
commit | f1198ea3cfae3a3567e4ab4d2c741ed98b86f976 (patch) | |
tree | f19b19505f66aefa6d96d1d2feeb59f4202ae6ef /src/network | |
parent | 20c6d83f5566590a65895b4fa11bf31fee3dcc44 (diff) | |
download | musl-f1198ea3cfae3a3567e4ab4d2c741ed98b86f976.tar.gz musl-f1198ea3cfae3a3567e4ab4d2c741ed98b86f976.tar.bz2 musl-f1198ea3cfae3a3567e4ab4d2c741ed98b86f976.tar.xz musl-f1198ea3cfae3a3567e4ab4d2c741ed98b86f976.zip |
in hosts file lookups, honor first canonical name regardless of family
prior to this change, the canonical name came from the first hosts
file line matching the requested family, so the canonical name for a
given hostname could differ depending on whether it was requested with
AF_UNSPEC or a particular family (AF_INET or AF_INET6). now, the
canonical name is deterministically the first one to appear with the
requested name as an alias.
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/lookup_name.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/lookup_name.c b/src/network/lookup_name.c index 04624845..aa558c19 100644 --- a/src/network/lookup_name.c +++ b/src/network/lookup_name.c @@ -80,7 +80,7 @@ static int name_from_hosts(struct address buf[static MAXADDRS], char canon[stati continue; default: badfam = EAI_NONAME; - continue; + break; } if (have_canon) continue; |