]> git.ipfire.org Git - thirdparty/asterisk.git/commit
pjproject_bundled: Prevent SERVFAIL from marking name server bad 10/3910/2
authorGeorge Joseph <gjoseph@digium.com>
Wed, 7 Sep 2016 19:48:48 +0000 (13:48 -0600)
committerGeorge Joseph <gjoseph@digium.com>
Thu, 15 Sep 2016 13:23:16 +0000 (08:23 -0500)
commit4d64b176ebbd6ee6c51f028068a0d0d6ddaa4ac7
treee07f5b17c4b0339b2ea8feecb09c6039707bcdb6
parent11d05fc3699aa3547be722b83529bfecbe15ee4f
pjproject_bundled:  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.

Although we use our own resolver in 14 and master and don't have this
issue there, Teluu has merged this patch upstream so it's appropriate
to cherry-pick to 14 and master to keep pjproject consistent.

Change-Id: Ie03ba902288e274aff23f9b9bb2786e1e8be09e0
third-party/pjproject/patches/0004-resolver.c-Prevent-SERVFAIL-from-marking-name-server.patch [new file with mode: 0644]