[Pkg-voip-commits] [pjproject] 07/14: resolver.c: Prevent SERVFAIL from marking name server bad

Bernhard Schmidt berni at moszumanska.debian.org
Thu Nov 10 09:32:02 UTC 2016


This is an automated email from the git hooks/post-receive script.

berni pushed a commit to branch master
in repository pjproject.

commit d27b8883103928d4348920a8323d13996760c890
Author: George Joseph <gjoseph at digium.com>
Date:   Wed Sep 7 13:10:57 2016 -0600

    resolver.c:  Prevent SERVFAIL from marking name server bad
    
    
    A name server that returns "Server Failure" is indicating only that
    the server couldn't process that particular request.  We should NOT
    assume that the name server is incapable of serving other requests.
    
    Here's the scenario we've been encountering...
    
    * 2 local name servers configured in resolv.conf.
    * An OPTIONS request causes a request for A and AAAA records to go out
      to both nameservers.
    * The A responses both come back successfully resolved.
    * Because of an issue at some upstream nameserver, the AAAA responses
      for that particular query come back as "SERVFAIL" from both local
      name servers.
    * Both local servers are marked as bad and no further queries can be
      sent until the 60 second ttl expires.  Only previously cached results
      can be used.
    * In this case, 60 seconds is just enough time for another OPTIONS
      request to go out to the same host so the cycle repeats.
    
    We could set the bad ttl really low but that also affects REFUSED and
    NOTAUTH which probably DO signal a real server issue.  Besides, even
    a really low bad ttl would be an issue on a pbx.
    Patch-Category: asterisk
---
 pjlib-util/src/pjlib-util/resolver.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/pjlib-util/src/pjlib-util/resolver.c b/pjlib-util/src/pjlib-util/resolver.c
index ff4a199..e5e1bed 100644
--- a/pjlib-util/src/pjlib-util/resolver.c
+++ b/pjlib-util/src/pjlib-util/resolver.c
@@ -1363,8 +1363,7 @@ static void report_nameserver_status(pj_dns_resolver *resolver,
 	q_id = (pj_uint32_t)-1;
     }
 
-    if (!pkt || rcode == PJ_DNS_RCODE_SERVFAIL ||
-	        rcode == PJ_DNS_RCODE_REFUSED ||
+    if (!pkt || rcode == PJ_DNS_RCODE_REFUSED ||
 	        rcode == PJ_DNS_RCODE_NOTAUTH) 
     {
 	is_good = PJ_FALSE;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/pjproject.git



More information about the Pkg-voip-commits mailing list