|
@@ -71,6 +71,7 @@ static void nslookup_close ( struct nslookup *nslookup, int rc ) {
|
71
|
71
|
static void nslookup_resolv_done ( struct nslookup *nslookup,
|
72
|
72
|
struct sockaddr *sa ) {
|
73
|
73
|
struct sockaddr_in *sin;
|
|
74
|
+ struct sockaddr_in6 *sin6;
|
74
|
75
|
const struct setting_type *default_type;
|
75
|
76
|
struct settings *settings;
|
76
|
77
|
struct setting setting;
|
|
@@ -86,6 +87,12 @@ static void nslookup_resolv_done ( struct nslookup *nslookup,
|
86
|
87
|
len = sizeof ( sin->sin_addr );
|
87
|
88
|
default_type = &setting_type_ipv4;
|
88
|
89
|
break;
|
|
90
|
+ case AF_INET6:
|
|
91
|
+ sin6 = ( ( struct sockaddr_in6 * ) sa );
|
|
92
|
+ data = &sin6->sin6_addr;
|
|
93
|
+ len = sizeof ( sin6->sin6_addr );
|
|
94
|
+ default_type = &setting_type_ipv6;
|
|
95
|
+ break;
|
89
|
96
|
default:
|
90
|
97
|
rc = -ENOTSUP;
|
91
|
98
|
goto err;
|