Files
asterisk/third-party/pjproject/patches/0006-r5473-svn-backport-Fix-pending-query.patch
Richard Mudgett 6feee22e09 bundled pjproject: Crashes while resolving DNS names.
PJPROJECT 2.5.5 introduced a race condition with the -r5349 IPv6 DNS
patch.

The patches below fix the DNS lookup race condition crash caused by
attempting to send the same message twice for the single DNS lookup.

0006-r5471-svn-backport-Various-fixes-for-DNS-IPv6.patch
0006-r5473-svn-backport-Fix-pending-query.patch

The patch below removes a cached DNS response from the hash table when
another thread is referencing the old entry.  The table still contained
the entry when it was destroyed which can result in inexplicable crashes.

0006-r5475-svn-backport-Remove-DNS-cache-entry.patch

ASTERISK-26344 #close
Reported by: Ian Gilmour

ASTERISK-26387 #close
Reported by: Harley Peters

Change-Id: I17fde80359e66f65a91341ceca58d914d0f61cc4
2016-10-28 17:15:32 -05:00

29 lines
896 B
Diff

From 509d4339747f11cfbde3a0acc447ef5d521eea93 Mon Sep 17 00:00:00 2001
From: Richard Mudgett <rmudgett@digium.com>
Date: Fri, 28 Oct 2016 12:12:28 -0500
Subject: [PATCH 2/3] r5473 svn backport Fix pending query
Re #1974:
If there is a pending query, set the return value to that query (instead of NULL)
Thanks to Richard Mudgett for the patch.
---
pjlib-util/src/pjlib-util/resolver.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/pjlib-util/src/pjlib-util/resolver.c b/pjlib-util/src/pjlib-util/resolver.c
index d24ef9d..fe687b7 100644
--- a/pjlib-util/src/pjlib-util/resolver.c
+++ b/pjlib-util/src/pjlib-util/resolver.c
@@ -940,6 +940,7 @@ PJ_DEF(pj_status_t) pj_dns_resolver_start_query( pj_dns_resolver *resolver,
/* Done. This child query will be notified once the "parent"
* query completes.
*/
+ p_q = nq;
status = PJ_SUCCESS;
goto on_return;
}
--
1.7.9.5