Skip to content

Commit

Permalink
Add support for NXNAME type
Browse files Browse the repository at this point in the history
IANA har allocated the NXNAME meta type to indicate an NSEC/NSEC3 record
signals that the name does not exist (corresponds to NXDOMAIN).
NXNAME is a meta type only for use with NSEC/NSEC3 bitmaps and use is
defined in https://datatracker.ietf.org/doc/draft-ietf-dnsop-compact-denial-of-existence/
  • Loading branch information
Christian Elmerot committed Jul 22, 2024
1 parent 870b1c1 commit 2913d69
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
14 changes: 14 additions & 0 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ const (
TypeLP uint16 = 107
TypeEUI48 uint16 = 108
TypeEUI64 uint16 = 109
TypeNXNAME uint16 = 128
TypeURI uint16 = 256
TypeCAA uint16 = 257
TypeAVC uint16 = 258
Expand Down Expand Up @@ -294,6 +295,19 @@ func (*NULL) parse(c *zlexer, origin string) *ParseError {
return &ParseError{err: "NULL records do not have a presentation format"}
}

// NXNAME is a meta record. See https://www.iana.org/go/draft-ietf-dnsop-compact-denial-of-existence-04
// Reference: https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml
type NXNAME struct {
Hdr RR_Header
// Does not have any rdata
}

func (rr *NXNAME) String() string { return rr.Hdr.String() }

func (*NXNAME) parse(c *zlexer, origin string) *ParseError {
return &ParseError{err: "NXNAME records do not have a presentation format"}
}

// CNAME RR. See RFC 1034.
type CNAME struct {
Hdr RR_Header
Expand Down
12 changes: 12 additions & 0 deletions ztypes.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2913d69

Please sign in to comment.