Bug 447005

Summary: getaddrinfo fails on 2.8.90-1
Product: [Fedora] Fedora Reporter: Orion Poplawski <orion>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-19 08:51:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Orion Poplawski 2008-05-16 22:32:16 UTC
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:
%s\n",hostname,gai_strerror(err));
   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 192.168.0.8
earth.cora.nwra.com mail is handled by 10 earth.cora.nwra.com.


Version-Release number of selected component (if applicable):
glibc-2.8.90-1.i686

Comment 1 Jakub Jelinek 2008-05-19 08:51:09 UTC
Should be fixed in glibc-2.8.90-{2,3}.