[Asterisk-code-review] dns core: Allow zero-length DNS responses. (asterisk[master])

Mark Michelson asteriskteam at digium.com
Fri Jul 31 09:46:07 CDT 2015


Mark Michelson has uploaded a new patch set (#3).

Change subject: dns_core: Allow zero-length DNS responses.
......................................................................

dns_core: Allow zero-length DNS responses.

A testsuite test recently failed due to a crash that occurred in the DNS
core. The problem was that the test could not resolve an address, did
not set a result on the DNS query, and then indicated the query was
completed. The DNS core does not handle the case of a query with no
result gracefully, and so there is a crash.

This changeset makes the DNS system resolver set a result with a
zero-length answer in the case that a DNS resolution failure occurs
early. The DNS core now also will accept such a response without
treating it as invalid input. A unit test was updated to no longer treat
setting a zero-length response as off-nominal.

Change-Id: Ie56641e22debdaa61459e1c9a042e23b78affbf6
---
M include/asterisk/dns_resolver.h
M main/dns.c
M main/dns_core.c
M tests/test_dns.c
4 files changed, 10 insertions(+), 23 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/85/985/3
-- 
To view, visit https://gerrit.asterisk.org/985
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie56641e22debdaa61459e1c9a042e23b78affbf6
Gerrit-PatchSet: 3
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-code-review mailing list