Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 153601 - net-dns/bind-9.3.2-r4 localhost zone invalid NS record
Summary: net-dns/bind-9.3.2-r4 localhost zone invalid NS record
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Konstantin Arkhipov (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-31 13:42 UTC by michael
Modified: 2006-12-19 08:19 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description michael 2006-10-31 13:42:44 UTC
/var/bind/pri/localhost.zone as installed by the bind-9.3.2-r4 ebuild includes the following record:

@ IN NS 127.0.0.1

This is invalid according to RFC 1034 section 3.6, part RDATA, which explicitly states that a NS RR's RDATA is a host name, not an IP address. Used in a zone "localhost" the record above will be expanded as:

@ IN NS 127.0.0.1.localhost.

which obviously is not the intended meaning. In a root zone it would be expanded to "127.0.0.1." which also cannot resolve because there most likely is no "1" top level domain set up.

The record mentioned above should be changed to:

@ IN NS ns
ns IN A 127.0.0.1

Alternatively, "ns.localhost." can be substituted for "ns". Please note trailing period. I would also suggest adding the IPv6 equivalent address record, in addition to the IPv4 record above:

ns IN AAAA ::1
Comment 1 Konstantin Arkhipov (RETIRED) gentoo-dev 2006-12-17 09:54:25 UTC
changed in 9.2.7/9.3.3 to:

@               IN      NS      ns
ns              IN      A       127.0.0.1

ns              IN      AAAA    ::1

thanks for reporting.
Comment 2 cilly 2006-12-19 08:15:15 UTC
(In reply to comment #1)
> changed in 9.2.7/9.3.3 to:
> 
> @               IN      NS      ns
> ns              IN      A       127.0.0.1
> 
> ns              IN      AAAA    ::1
> 
> thanks for reporting.
> 

Why don't you use:

$TTL 1W
@       IN      SOA     localhost. root.localhost.  (
                                      2006121902 ; Serial
                                      28800      ; Refresh
                                      14400      ; Retry
                                      604800     ; Expire - 1 week
                                      86400 )    ; Minimum
                IN      NS      localhost.
localhost.      IN      A       127.0.0.1
                IN      AAAA    ::1

instead of the additional ns.localhost. ?
Comment 3 cilly 2006-12-19 08:19:23 UTC
(In reply to comment #0)


> I would also suggest adding the IPv6 equivalent address
> record, in addition to the IPv4 record above:
> 
> ns IN AAAA ::1
> 

If you add this, then you should add to named.conf:

zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
        type master;
        file "pri/0.zone";
        allow-update { none; };
        notify no;
};

And the 0.zone file:

$ORIGIN 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa.
$TTL 1W
@                       1D IN SOA       localhost. root.localhost. (
                                        2002081601      ; serial
                                        3H              ; refresh
                                        15M             ; retry
                                        1W              ; expiry
                                        1D )            ; minimum

                        1D IN NS        localhost.
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 IN      PTR     localhost.