diff options
author | Jeremy Allison <jra@samba.org> | 2007-10-29 13:34:00 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2007-10-29 13:34:00 -0700 |
commit | e2d0526c9799a75f87bbbe24f2e5a268df89fea9 (patch) | |
tree | 27527f08d76ecf5b1f018c99763054d2c3577c46 /source3/libsmb/namequery.c | |
parent | 6ca0d8124c26edec1d9232d7380c4b66a2915cad (diff) | |
download | samba-e2d0526c9799a75f87bbbe24f2e5a268df89fea9.tar.gz samba-e2d0526c9799a75f87bbbe24f2e5a268df89fea9.tar.bz2 samba-e2d0526c9799a75f87bbbe24f2e5a268df89fea9.zip |
Change our DNS code to cope with AAAA records. A6 records
look like a nightmare to use, so ignore them for now.
Jeremy.
(This used to be commit 814daded90781dc5a5bdd522ea8cfe5d47e6d7a7)
Diffstat (limited to 'source3/libsmb/namequery.c')
-rw-r--r-- | source3/libsmb/namequery.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c index f4c516921c..dde758b41c 100644 --- a/source3/libsmb/namequery.c +++ b/source3/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 |