[lkml]   [2012]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 2/2] Define ENONAMESERVICE and ENAMEUNKNOWN to indicate name service errors
    David Howells wrote:

    Jim Rees <> wrote:

    > Define ENAMEUNKNOWN to indicate "Network name unknown". This can be used to
    > indicate, for example, that an attempt was made by dns_query() to make a query,
    > but the name server (e.g. a DNS server) replied indicating that it had no
    > matching records.
    > 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().

     \ /
      Last update: 2012-02-09 14:47    [W:0.021 / U:118.740 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site