From: David Howells <dhowells@redhat.com>
To: Jim Rees <rees@umich.edu>
Cc: dhowells@redhat.com, jmorris@namei.org, keyrings@linux-nfs.org,
linux-nfs@vger.kernel.org, linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-cifs@vger.kernel.org,
linux-api@vger.kernel.org, libc-alpha@sourceware.org
Subject: Re: [PATCH 2/2] Define ENONAMESERVICE and ENAMEUNKNOWN to indicate name service errors
Date: Fri, 10 Feb 2012 20:02:05 +0000 [thread overview]
Message-ID: <25436.1328904125@redhat.com> (raw)
In-Reply-To: <20120209134429.GC6663@umich.edu>
Jim Rees <rees@umich.edu> wrote:
> > Would this be the same as NXDOMAIN? That is, does it mean the name server
> > couldn't find a record, or does it mean that the record doesn't exist?
>
> Is there a way to tell the difference? Can you store a negative record in
> the DNS? Or is it that the DNS has records for the name, just not records
> of the type you're looking for (eg. NO_ADDRESS/NO_DATA from
> gethostbyname())?
>
> It's an important distinction to the resolver if you want to avoid dns
> hijacking. See rfc2308. There doesn't seem to be a way to tell the
> difference from the gethostbyname call, which was designed before this was a
> problem. The on-the-wire dns query protocol does make the distinction.
>
> I suspect kernel dns clients won't need to know the difference, but I think
> it's useful if we decide on and document the meaning of the error codes.
> Maybe the answer is that ENAMEUNKNOWN means the same as a HOST_NOT_FOUND
> from gethostbyname().
Should I propose an extra error code? Perhaps giving:
ENONAMESERVICE "Network name service unavailable"
ENAMEUNKNOWN "Network name not known"
ENONAMERECORD "Network name query returned no records"
Note that ENONAMESERVICE covers all of: not having a name service configured,
not being able to contact the configured name server and the configured name
server not being able to chain to the authoritative name server. However, I
think this is probably okay.
David
next prev parent reply other threads:[~2012-02-10 20:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-08 12:29 [PATCH 1/2] Define ENOAUTHSERVICE to indicate "Authentication service unavailable" David Howells
2012-02-08 12:29 ` [PATCH 2/2] Define ENONAMESERVICE and ENAMEUNKNOWN to indicate name service errors David Howells
2012-02-08 14:15 ` Jim Rees
2012-02-09 10:04 ` David Howells
2012-02-09 13:44 ` Jim Rees
2012-02-10 20:02 ` David Howells [this message]
2012-02-08 15:48 ` [PATCH 1/2] Define ENOAUTHSERVICE to indicate "Authentication service unavailable" Joseph S. Myers
2012-02-08 23:53 ` Valdis.Kletnieks
2012-02-09 10:01 ` David Howells
-- strict thread matches above, loose matches on Subject: below --
2012-06-01 3:32 Trond Myklebust
2012-06-01 3:32 ` [PATCH 2/2] Define ENONAMESERVICE and ENAMEUNKNOWN to indicate name service errors Trond Myklebust
2012-03-22 13:35 [PATCH 1/2] Define ENOAUTHSERVICE to indicate "Authentication service unavailable" David Howells
2012-03-22 13:35 ` [PATCH 2/2] Define ENONAMESERVICE and ENAMEUNKNOWN to indicate name service errors David Howells
2011-03-07 15:02 [PATCH 1/2] Define ENOAUTHSERVICE to indicate "Authentication service unavailable" David Howells
2011-03-07 15:02 ` [PATCH 2/2] Define ENONAMESERVICE and ENAMEUNKNOWN to indicate name service errors David Howells
2011-03-07 16:00 ` Alan Cox
2011-03-08 15:09 ` David Howells
2011-03-08 15:25 ` Alan Cox
2011-03-08 16:37 ` David Howells
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=25436.1328904125@redhat.com \
--to=dhowells@redhat.com \
--cc=jmorris@namei.org \
--cc=keyrings@linux-nfs.org \
--cc=libc-alpha@sourceware.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=rees@umich.edu \
/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.
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).