Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Thu, 23 Jan 2014 17:53:56 +0100
From: Szabolcs Nagy <>
Subject: domain name resolution issues

getaddrinfo fails to parse /etc/hosts entries if they are
whitespace prefixed (not sure if that's legit, but glibc
can parse it)

and only the first match is returned, eg.

	getaddrinfo("localhost", 0, 0, &ai);

only gives one result ( eventhough /etc/hosts says  localhost
	::1        localhost ip6-localhost ip6-loopback

then if i do a name lookup on the returned address with

	getnameinfo(ai->ai_addr, ai->ai_addrlen, host, sizeof host, serv, sizeof serv, 0);

it seems to do a complete dns query to the nameserver,
i wonder if it might worth to do a local /etc/hosts
search first

(i see now that the test system should run in a sandboxed
environment otherwise such interfaces are not possible to

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.