From cc90d8c3642afa626b483b92c53964365d72b35a Mon Sep 17 00:00:00 2001 From: Raimo Niskanen Date: Thu, 28 Jan 2010 17:01:00 +0100 Subject: inet:gethostbyname improved to parse IP strings and look up own hostname Now inet:gethostbyname tries to parse the hostname as an IP string first if the 'native' lookup method is not used. One can also make the IP string parsing explicit using the new 'string' lookup method, or avoid it using the new pseudo lookup method 'nostring'. In R13B04 a bug was introduced when the gethostbyname code was rewritten, so if the native resolver was used and misconfigured to not be able to look up the own hostname, inet:gethostbyname also failed. This is now fixed. --- erts/doc/src/inet_cfg.xml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'erts/doc/src') diff --git a/erts/doc/src/inet_cfg.xml b/erts/doc/src/inet_cfg.xml index 18cf65759a..d289c42557 100644 --- a/erts/doc/src/inet_cfg.xml +++ b/erts/doc/src/inet_cfg.xml @@ -230,6 +230,13 @@ (use the Erlang DNS client inet_res for nameserver queries).

+

The lookup method tries to + parse the hostname as a IPv4 or IPv6 string and return + the resulting IP address. It is automatically tried + first when is not + in the list. To skip it in this case + the pseudo lookup method can be + inserted anywhere in the list.

-- cgit v1.2.3