equal
deleted
inserted
replaced
1 --- a/src/netaddr.c |
|
2 +++ b/src/netaddr.c |
|
3 @@ -1295,12 +1295,19 @@ const char *pr_netaddr_get_dnsstr(pr_netaddr_t *na) { |
|
4 buf[sizeof(buf)-1] = '\0'; |
|
5 |
|
6 if (res == 0) { |
|
7 + int err_num; |
|
8 + int flags; |
|
9 char **checkaddr; |
|
10 struct hostent *hent = NULL; |
|
11 unsigned char ok = FALSE; |
|
12 int family = pr_netaddr_get_family(na); |
|
13 void *inaddr = pr_netaddr_get_inaddr(na); |
|
14 - |
|
15 + |
|
16 +//#ifdef HAVE_GETIPNODEBYNAME |
|
17 +#if 1 |
|
18 + flags=AI_V4MAPPED; |
|
19 + hent=getipnodebyname(buf, family, flags, &err_num); |
|
20 +#else |
|
21 #ifdef HAVE_GETHOSTBYNAME2 |
|
22 if (pr_netaddr_is_v4mappedv6(na) == TRUE) { |
|
23 family = AF_INET; |
|
24 @@ -1311,6 +1318,7 @@ const char *pr_netaddr_get_dnsstr(pr_netaddr_t *na) { |
|
25 #else |
|
26 hent = gethostbyname(buf); |
|
27 #endif /* HAVE_GETHOSTBYNAME2 */ |
|
28 +#endif /* HAVE_GETIPNODEBYNAME */ |
|
29 |
|
30 if (hent != NULL) { |
|
31 |
|
32 |
|