[Mono-bugs] [Bug 322587] Dns.GetHostEntry fails to resolve IP addresses

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Nov 5 13:10:36 EST 2007


https://bugzilla.novell.com/show_bug.cgi?id=322587#c2





--- Comment #2 from Geoff Norton <gnorton at novell.com>  2007-11-05 11:10:36 MST ---
Ok I've figured out whats wrong here.  Our call pattern in this case is
roughly:

struct sockaddr_in saddr;
char hostname[1024] = {0};

inet_pton (AF_INET, address, &saddr.sin_addr);
getnameinfo ((struct sockaddr *)&saddr, sizeof (struct sockaddr), hostname,
sizeof (hostname), NULL, 0, 0);

The problem is on darwin struct sockaddr_in has a sin_len property that is
initialized to 0.  The sin_len (at least for AF_INET) should be 16 and then the
getnameinfo call will succeed.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list