AIX- 'Host not found' in getaddrinfo("0.0.0.0", "22" , ...)

"Petersen, Jörg" j.petersen at msh.de
Tue Jan 18 21:33:12 EST 2000


Hello,
   while openssh-1.2.1pre25 ran out-of-the box, in openssh-1.2.1pre27 the
sshd fails to start with: "Host not found" returned...
(gcc 2.9.5.2 under AIX 4.3.2 ML 2)

Incompatibility of AIX-getaddrinfo ????
Since I'm not familiar with getaddrinfo, I've got no idea what goes wrong
??? Does the code below work on other architectures?

Demo-Code built with values taken from a debug-session:
=======================================================
#include <stdio.h>
#include <sys/socket.h>
#include <netdb.h>

void main (void) {
   
struct addrinfo hints;
struct addrinfo *res;
int gaierr;

hints.ai_family = AF_UNSPEC;
hints.ai_flags = 0;
hints.ai_flags = 0;
hints.ai_family = 0;
hints.ai_socktype = 1; /* = SOCK_STREAM; */
hints.ai_protocol = 0;
hints.ai_addrlen = 0;
hints.ai_canonname = 0x0;
hints.ai_addr = 0x0;
hints.ai_next = 0x0;

gaierr = getaddrinfo("0.0.0.0", "22" , &hints, &res);

printf("gaierr=%i (=%s)\n",gaierr,gai_strerror(gaierr));
}





More information about the openssh-unix-dev mailing list