[krbdev.mit.edu #1392] getaddrinfo wrapper not good enough on AIX
donn@u.washington.edu via RT
rt-comment at krbdev.mit.edu
Wed Apr 2 15:03:53 EST 2003
Quoth Ken Raeburn <raeburn at MIT.EDU>:
| Hi, Don. Could you try out the attached patch and let me know if it
| fixes the ai_canonname problems we were discussing for you?
It does, sort of. I hadn't actually even built 1.3 on AIX,
only tried fake-addrinfo.h on its own, but before trying your
patch I built it straight and verified that there actually is
a problem. And there is:
$ ./telnet -a homer.u
telnet: system library bug? getaddrinfo returns numeric address
as canonical name of homer.u
Trying 140.142.15.37...
telnet: connect to address 140.142.15.37: Can't assign requested address
telnet: Unable to connect to remote host: Can't assign requested address
After applying your patch, the "system library bug?" line went away.
The last two stayed, though, because of another problem in fake-addrinfo.h,
it applies the service host value that would have been computed if the
service were numeric, even when the service was not numeric and that value
was never computed. I hacked in a solution, context diff appended.
Finally, of course it still didn't work because the returned host name
is not canonical in the sense of reverse-lookup stable, but I gather
this is not the problem you're trying to solve here.
Donn Cave, University Computing Services, University of Washington
donn at u.washington.edu
-----------------------------
*** fake-addrinfo.h.p1 Wed Apr 2 09:46:08 2003
--- fake-addrinfo.h Wed Apr 2 11:51:06 2003
***************
*** 1054,1060 ****
#endif
#ifdef NUMERIC_SERVICE_BROKEN
! for (ai = *result; ai; ai = ai->ai_next) {
if (socket_type != 0 && ai->ai_socktype == 0)
/* Is this check actually needed? */
ai->ai_socktype = socket_type;
--- 1054,1060 ----
#endif
#ifdef NUMERIC_SERVICE_BROKEN
! if (service_port) for (ai = *result; ai; ai = ai->ai_next) {
if (socket_type != 0 && ai->ai_socktype == 0)
/* Is this check actually needed? */
ai->ai_socktype = socket_type;
More information about the krb5-bugs
mailing list