Allow @ to be recognized as zone origin

This commit is contained in:
Miek Gieben 2012-02-14 13:23:09 +01:00
parent e1b6c642ab
commit b49e4f2411
3 changed files with 7 additions and 1 deletions

View File

@ -65,3 +65,4 @@ zzzzz.miek.nl. 86400 IN RRSIG NSEC 8 3 86400 20110823011301 20110724011
a.example. CLASS32 TYPE731 \# 6 abcd (
ef 01 23 45 )
b.example. HS TYPE62347 \# 0
@ IN NS a.miek.nl.

View File

@ -167,6 +167,11 @@ func parseZone(r io.Reader, f string, t chan Token, include int) {
st = _EXPECT_OWNER_DIR
case _OWNER:
h.Name = l.token
if l.token == "@" {
h.Name = origin
st = _EXPECT_OWNER_BL
break
}
_, ld, ok := IsDomainName(l.token)
if !ok {
t <- Token{Error: &ParseError{f, "bad owner name", l}}

View File

@ -748,7 +748,7 @@ func setRFC3597(h RR_Header, c chan lex, f string) (RR, *ParseError) {
rr.Hdr = h
l := <-c
if l.token != "\\#" {
return nil, &ParseError{f, "bad RFC3597 Token", l}
return nil, &ParseError{f, "Unkown RR type", l}
}
<-c // _BLANK
l = <-c