Skip to content

Commit ee99288

Browse files
chreoChristian Elmerot
and
Christian Elmerot
authored
Add support for NXNAME type (#1584)
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 <[email protected]>
1 parent 8d05ff7 commit ee99288

File tree

4 files changed

+46
-0
lines changed

4 files changed

+46
-0
lines changed

types.go

+14
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ const (
9696
TypeLP uint16 = 107
9797
TypeEUI48 uint16 = 108
9898
TypeEUI64 uint16 = 109
99+
TypeNXNAME uint16 = 128
99100
TypeURI uint16 = 256
100101
TypeCAA uint16 = 257
101102
TypeAVC uint16 = 258
@@ -294,6 +295,19 @@ func (*NULL) parse(c *zlexer, origin string) *ParseError {
294295
return &ParseError{err: "NULL records do not have a presentation format"}
295296
}
296297

298+
// NXNAME is a meta record. See https://www.iana.org/go/draft-ietf-dnsop-compact-denial-of-existence-04
299+
// Reference: https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml
300+
type NXNAME struct {
301+
Hdr RR_Header
302+
// Does not have any rdata
303+
}
304+
305+
func (rr *NXNAME) String() string { return rr.Hdr.String() }
306+
307+
func (*NXNAME) parse(c *zlexer, origin string) *ParseError {
308+
return &ParseError{err: "NXNAME records do not have a presentation format"}
309+
}
310+
297311
// CNAME RR. See RFC 1034.
298312
type CNAME struct {
299313
Hdr RR_Header

zduplicate.go

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

zmsg.go

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ztypes.go

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)