Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 652835 Details for
Bug 880698
glibc: getaddrinfo() doesn't order results correctly when node is NULL
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
gai_bug.c by Hans Nieser
file_880698.txt (text/plain), 859 bytes, created by
David Jaša
on 2012-11-27 15:57:32 UTC
(
hide
)
Description:
gai_bug.c by Hans Nieser
Filename:
MIME Type:
Creator:
David Jaša
Created:
2012-11-27 15:57:32 UTC
Size:
859 bytes
patch
obsolete
>#include <stdio.h> >#include <stdlib.h> >#include <string.h> >#include <netdb.h> >#include <sys/types.h> >#include <sys/socket.h> > >int main(int argc, char **argv) >{ > struct addrinfo hints, *result, *ai; > > memset(&hints, 0, sizeof(struct addrinfo)); > > hints.ai_socktype = SOCK_STREAM; > hints.ai_flags |= AI_PASSIVE; > hints.ai_flags |= AI_ADDRCONFIG; > > if (getaddrinfo(NULL, argv[1], &hints, &result)) > { > printf("failed to get addresses\n"); > exit(EXIT_FAILURE); > } > > for (ai = result; ai != NULL; ai = ai->ai_next) > { > if (ai->ai_family == AF_INET) > printf("this is an IPv4 result\n"); > else if(ai->ai_family == AF_INET6) > printf("this is an IPv6 result\n"); > else > printf("eww what's this?\n"); > } > > freeaddrinfo(result); >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 880698
: 652835 |
748281