standards/114910: getaddrinfo() fails to set ai_canonname

Mark Andrews Mark_Andrews at isc.org
Wed Aug 1 05:50:06 UTC 2007


The following reply was made to PR standards/114910; it has been noted by GNATS.

From: Mark Andrews <Mark_Andrews at isc.org>
To: bug-followup at FreeBSD.org, marka at isc.org
Cc:  
Subject: Re: standards/114910: getaddrinfo() fails to set ai_canonname
Date: Wed, 01 Aug 2007 15:47:42 +1000

 The problem is that getanswer() only adds ai_canonname to the first 
 element of the list.
 reorder() is then called and depending apon the order of the records 
 returned from
 the DNS the addrinfo structure without the ai_canonname set is moved to the
 start of the list.
 
 The solution is to have getanswer() set ai_canonname on ALL elements in 
 the list.


More information about the freebsd-standards mailing list