Bug 447005 - getaddrinfo fails on 2.8.90-1
getaddrinfo fails on 2.8.90-1
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-05-16 18:32 EDT by Orion Poplawski
Modified: 2008-05-19 04:51 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-05-19 04:51:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Orion Poplawski 2008-05-16 18:32:16 EDT
Description of problem:

getaddrinfo appears to return errors.

#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <stdio.h>
#include <string.h>

int main(int argc, char *argv[])
 struct addrinfo query, *response, *ap;
 int err;
 char* hostname = "earth";

 memset(&query,0,sizeof(struct addrinfo));
 query.ai_family = AF_UNSPEC;
 query.ai_socktype = SOCK_STREAM;

  if ((err = getaddrinfo(hostname,NULL,&query,&response)) != 0)
   fprintf(stderr,"Unable to lookup hostname (%s) or cfengine service:
   return -1;

 return 0;

$ ./getaddrinfo
Unable to lookup hostname (earth) or cfengine service: Name or service not known
$ host earth
earth.cora.nwra.com has address
earth.cora.nwra.com mail is handled by 10 earth.cora.nwra.com.

Version-Release number of selected component (if applicable):
Comment 1 Jakub Jelinek 2008-05-19 04:51:09 EDT
Should be fixed in glibc-2.8.90-{2,3}.

Note You need to log in before you can comment on or make changes to this bug.