This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug network/13928] New: TTL value associated with a CNAME record is overridden by its alias

             Bug #: 13928
           Summary: TTL value associated with a CNAME record is overridden
                    by its alias
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: network
    Classification: Unclassified

If the result of a DNS query is a CNAME and its aliases down to an A or AAAA
record, the TTL of the result is taken as that of the A or AAAA record the
query finally resolves to.

There doesn't seem to be anything specific in the DNS RFC that talks about
this, but the obvious approach ought to be to have the minimum of the TTL
values in the entire chain of resolutions (CNAME -> CNAME -> ... -> A|AAAA) as
the TTL for the DNS entry.

This behaviour affects how long nscd caches a DNS entry before it looks to
reload it. In a case such as the one below, nscd may end up waiting for 20
minutes before it reloads its cache, when ideally it should have waited for
just 15 seconds for and 60 seconds for

Steps To Reproduce:

1) Set up a bind server with the following zone file:

$TTL     1200
@  1D  IN        SOA (
                              2002022401 ; serial
                              3H ; refresh
                              15 ; retry
                              1w ; expire
                              3h ; minimum
       IN  NS ; in the domain
; server host definitions
ns1    IN  A  ;name server definition     

; non server domain hosts
ad   IN  A
;ad   IN  AAAA      ::8
cad 60  IN  CNAME  ad
bad 15  IN  CNAME  cad

2) Start nscd
3) getent hosts
4) Modify the A record entry to
5) Wait for up to 30 seconds (15 seconds of the TTL and the 15 second minimum
wait in nscd for extra buffer time)
5) getenthosts

Actual Results:

Expected Result:

Configure bugmail:
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]