|
|
@ -54,16 +54,12 @@ |
|
|
|
#include "ares_inet_net_pton.h" |
|
|
|
#include "ares_inet_net_pton.h" |
|
|
|
#include "ares_private.h" |
|
|
|
#include "ares_private.h" |
|
|
|
|
|
|
|
|
|
|
|
#ifndef IFNAMSIZ |
|
|
|
|
|
|
|
# define IFNAMSIZ 64 |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct { |
|
|
|
typedef struct { |
|
|
|
struct ares_addr addr; |
|
|
|
struct ares_addr addr; |
|
|
|
unsigned short tcp_port; |
|
|
|
unsigned short tcp_port; |
|
|
|
unsigned short udp_port; |
|
|
|
unsigned short udp_port; |
|
|
|
|
|
|
|
|
|
|
|
char ll_iface[IFNAMSIZ]; |
|
|
|
char ll_iface[IF_NAMESIZE]; |
|
|
|
unsigned int ll_scope; |
|
|
|
unsigned int ll_scope; |
|
|
|
} ares_sconfig_t; |
|
|
|
} ares_sconfig_t; |
|
|
|
|
|
|
|
|
|
|
@ -351,7 +347,7 @@ static ares_status_t ares__sconfig_linklocal(ares_sconfig_t *s, |
|
|
|
unsigned int ll_scope = 0; |
|
|
|
unsigned int ll_scope = 0; |
|
|
|
|
|
|
|
|
|
|
|
if (ares_str_isnum(ll_iface)) { |
|
|
|
if (ares_str_isnum(ll_iface)) { |
|
|
|
char ifname[IFNAMSIZ] = ""; |
|
|
|
char ifname[IF_NAMESIZE] = ""; |
|
|
|
ll_scope = (unsigned int)atoi(ll_iface); |
|
|
|
ll_scope = (unsigned int)atoi(ll_iface); |
|
|
|
if (ares__if_indextoname(ll_scope, ifname, sizeof(ifname)) == NULL) { |
|
|
|
if (ares__if_indextoname(ll_scope, ifname, sizeof(ifname)) == NULL) { |
|
|
|
DEBUGF(fprintf(stderr, "Interface %s for ipv6 Link Local not found\n", |
|
|
|
DEBUGF(fprintf(stderr, "Interface %s for ipv6 Link Local not found\n", |
|
|
|