1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-02 09:44:18 +03:00

dns: fix comments and make s4/libcli/resolve dns resolver working

After migrating to use libaddns, reply_to_addrs() needed to change the
way answers are iterated through. Originally libroken implementation
gave all answers as separate records with last one being explicitly NULL.
libaddns unmarshalling code gives all non-NULL answers and should be
iterated with explicit reply->num_answers in use.
This commit is contained in:
Alexander Bokovoy
2012-05-15 16:28:44 +03:00
parent 1feb31246d
commit f32d43763d
2 changed files with 4 additions and 4 deletions

View File

@@ -98,7 +98,7 @@ static int reply_to_addrs(TALLOC_CTX *mem_ctx, uint32_t *a_num,
}
*cur_addrs = addrs;
for (i = 0; reply->answers[i]; i++) {
for (i = 0; i < reply->num_answers; i++) {
rr = reply->answers[i];
/* we are only interested in the IN class */