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:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user