mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Eric Pruitt <eric.pruitt@gmail.com>
To: musl@lists.openwall.com
Subject: Re: [PATCH v5] resolver: mitigate bad interactions concering inconsistent DNS search domains with ndots usage
Date: Sat, 31 Mar 2018 10:22:32 -0700	[thread overview]
Message-ID: <20180331172232.5i4vxm27pbkeq3qq@sinister.lan.codevat.com> (raw)
In-Reply-To: <20180331094004.4153-1-nenolod@dereferenced.org>

On Sat, Mar 31, 2018 at 09:40:04AM +0000, William Pitcock wrote:
> In certain cases where the Kubernetes guest is configured with a clusterwide domain that is
> hosted by a certain large CDN provider (*ahem* Cloudflare), the resolver may process
> erroneous replies sent from that CDN provider that have an empty A/AAAA record set.
> [...]
> -	if ((abuf[0][3] & 15) == 0) return EAI_NONAME;
> +	if ((abuf[0][3] & 15) == 0) {
> +		/* A certain large CDN provider's DNS service erroneously responds to queries with
> +		 * a NOERROR(0) response code, while also returning an empty record set. Accordingly,
> +		 * check for this and handle it as we would an NXDOMAIN(3) if the record set is empty
> +		 * for both A and AAAA records. */
> +		if (nq == 2 && (ctx.recordcnt[0] + ctx.recordcnt[1]) == 0) return 0;
> +		else return EAI_NONAME;

If you're going to call out Cloudflare in the commit message, why not do
it in the code comment, too? If someone runs into this later without
having read this mailing list post and they're using a release copy of
musl (something without revision history like a tar ball), poorly
obscuring Cloudflare's name just adds unnecessary friction to debugging
the problem.

Eric


  reply	other threads:[~2018-03-31 17:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-31  9:40 William Pitcock
2018-03-31 17:22 ` Eric Pruitt [this message]
2018-03-31 22:47   ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180331172232.5i4vxm27pbkeq3qq@sinister.lan.codevat.com \
    --to=eric.pruitt@gmail.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).