diff options
author | Matthieu Patou <mat@matws.net> | 2011-11-06 00:23:41 +0100 |
---|---|---|
committer | Matthieu Patou <mat@samba.org> | 2011-11-06 03:18:00 +0100 |
commit | 2a8650ed79ef389e76caa7ce45ddcb2c682f56f6 (patch) | |
tree | 6ba9ccb957a565366d9899c6efa9f8e3848e7224 /source4/libcli/resolve | |
parent | 28984858486b9e61142afd3d34ae1e822e0ccef1 (diff) | |
download | samba-2a8650ed79ef389e76caa7ce45ddcb2c682f56f6.tar.gz samba-2a8650ed79ef389e76caa7ce45ddcb2c682f56f6.tar.bz2 samba-2a8650ed79ef389e76caa7ce45ddcb2c682f56f6.zip |
s4-resolver: fix bug with DNS servers returning AAAA records when asked for A records
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Sun Nov 6 03:18:00 CET 2011 on sn-devel-104
Diffstat (limited to 'source4/libcli/resolve')
-rw-r--r-- | source4/libcli/resolve/dns_ex.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/libcli/resolve/dns_ex.c b/source4/libcli/resolve/dns_ex.c index 993ef43caa..20f2c0c03a 100644 --- a/source4/libcli/resolve/dns_ex.c +++ b/source4/libcli/resolve/dns_ex.c @@ -196,6 +196,8 @@ static struct dns_records_container get_a_aaaa_records(TALLOC_CTX *mem_ctx, return ret; } + /* Some servers (Microsoft at least return here AAAA records .... */ + count += count_dns_rr(reply2->head, rk_ns_t_aaaa); count2 = count_dns_rr(reply2->head, rk_ns_t_a); } else { reply2 = NULL; @@ -241,8 +243,8 @@ static struct dns_records_container get_a_aaaa_records(TALLOC_CTX *mem_ctx, if (!rr->u.data) { continue; } - rr_to_string(mem_ctx, rr, port); - addrs[total] = rr_to_string(mem_ctx, rr, port); + + addrs[total] = rr_to_string(addrs, rr, port); if (addrs[total]) { total++; } |