summaryrefslogtreecommitdiff
path: root/source/libsmb/namequery.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-10-29 13:34:00 -0700
committerJeremy Allison <jra@samba.org>2007-10-29 13:34:00 -0700
commit814daded90781dc5a5bdd522ea8cfe5d47e6d7a7 (patch)
tree45031c33e20b748ce0a896893d9f9f52c986b554 /source/libsmb/namequery.c
parent95cc019af775a6ab28ea602ad767fa54d7c86197 (diff)
downloadsamba-814daded90781dc5a5bdd522ea8cfe5d47e6d7a7.tar.gz
Change our DNS code to cope with AAAA records. A6 records
look like a nightmare to use, so ignore them for now. Jeremy.
Diffstat (limited to 'source/libsmb/namequery.c')
-rw-r--r--source/libsmb/namequery.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/source/libsmb/namequery.c b/source/libsmb/namequery.c
index f4c516921c1..dde758b41cb 100644
--- a/source/libsmb/namequery.c
+++ b/source/libsmb/namequery.c
@@ -1341,15 +1341,14 @@ NTSTATUS resolve_ads(const char *name,
i = 0;
j = 0;
while ( i < numdcs && (*return_count<numaddrs) ) {
- struct in_addr ip;
struct ip_service *r = &(*return_iplist)[*return_count];
r->port = dcs[i].port;
/* If we don't have an IP list for a name, lookup it up */
- if (!dcs[i].ips) {
- ip = *interpret_addr2(dcs[i].hostname);
+ if (!dcs[i].ss_s) {
+ interpret_string_addr(&r->ss, dcs[i].hostname, 0);
i++;
j = 0;
} else {
@@ -1361,12 +1360,10 @@ NTSTATUS resolve_ads(const char *name,
continue;
}
- ip = dcs[i].ips[j];
+ r->ss = dcs[i].ss_s[j];
j++;
}
- in_addr_to_sockaddr_storage(&r->ss, ip);
-
/* make sure it is a valid IP. I considered checking the
* negative connection cache, but this is the wrong place
* for it. Maybe only as a hack. After think about it, if