[Bugs] [Bug 1739320] The result (hostname) of getnameinfo for all bricks (ipv6 addresses) are the same, while they are not.
bugzilla at redhat.com
bugzilla at redhat.com
Fri Aug 16 14:50:41 UTC 2019
https://bugzilla.redhat.com/show_bug.cgi?id=1739320
--- Comment #7 from Amgad <amgad.saleh at nokia.com> ---
I did some testing on "getnameinfo" and it works fine. When you pass the IPv6
address, it returns the right IP address.
I used the following test program:
#include <arpa/inet.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#define SIZE 1024
int main(int argc, char *argv[])
{
char host[SIZE];
char service[SIZE];
struct sockaddr_in6 sa;
sa.sin6_family = AF_INET6;
inet_pton(AF_INET6, argv[1], &sa.sin6_addr);
int res = getnameinfo((struct sockaddr*)&sa, sizeof(sa), host,
sizeof(host), service, sizeof(service), 0);
if(res)
{
exit(1);
}
else
{
printf("Hostname: %s\n", host);
printf("Service: %s\n", service);
}
return 0;
}
So I think the problem in what is passed to:
glusterd_compare_addrinfo(struct addrinfo *first, struct addrinfo *next) --
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
More information about the Bugs
mailing list