This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 447005 - getaddrinfo fails on 2.8.90-1
getaddrinfo fails on 2.8.90-1
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  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:
Environment:
Last Closed: 2008-05-19 04:51:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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:
%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 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.