diff options
author | George Joseph <george.joseph@fairview5.com> | 2015-11-16 15:10:20 -0700 |
---|---|---|
committer | George Joseph <george.joseph@fairview5.com> | 2015-11-16 15:10:20 -0700 |
commit | 6919daab61142e74f8313def68310465d7be998e (patch) | |
tree | b649e4474789adc6bdec5ec081fa56941bdc3ef6 /main/dns.c | |
parent | a1fcf6f7b28caf8e2f9b808449c86515e2ef90c4 (diff) |
dns: Fix pointer increment in dns_parse_answer_ex
When dns_parse_answer_ex was iterating over the answers it
wasn't incrementing the answer pointer correctly after the first
answer. The result was that no answers after the first
were being returned. For results where multiple records should
have been sorted by priority, weight, etc., there was nothing
to sort so the only the first record was returned even if it
wouldn't have been the correct record based on the sort.
ASTERISK-25565 #close
Reported-by: Daniel Tryba
Tested-by George Joseph
Change-Id: I8622604fefdcd3c11e2c5609a6382e53b1467b0b
Diffstat (limited to 'main/dns.c')
-rw-r--r-- | main/dns.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/dns.c b/main/dns.c index c3b352d41..e338d768b 100644 --- a/main/dns.c +++ b/main/dns.c @@ -482,7 +482,7 @@ static int dns_parse_answer_ex(void *context, int rr_class, int rr_type, unsigne /* Try and update the field to the next record, but ignore any errors that come * back because this may be the end of the line. */ - pos = dns_advance_field(&answer, pos, res + ntohs(ans->size)); + pos = dns_advance_field(&answer, pos, ntohs(ans->size)); } return ret; |