Skip to content

Commit

Permalink
Add support for NXNAME type (#1584)
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/

Co-authored-by: Christian Elmerot <elmerot@cloudflare.com>
  • Loading branch information
Chreo and Christian Elmerot committed Aug 3, 2024
1 parent 8d05ff7 commit ee99288
Show file tree
Hide file tree
Showing 4 changed files with 46 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
9 changes: 9 additions & 0 deletions zduplicate.go

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

11 changes: 11 additions & 0 deletions zmsg.go

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

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 ee99288

Please sign in to comment.