Skip to content

Commit

Permalink
Add NXT record (#1516)
Browse files Browse the repository at this point in the history
This add the NXT record (2535) to implement all records from the RFC.

Also does a s/RFC RFC/RFC/ as I happen to bumb into that will editing
the comments.

Signed-off-by: Miek Gieben <[email protected]>
  • Loading branch information
miekg authored Jan 18, 2024
1 parent e7aed24 commit 4c06a1b
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 4 deletions.
2 changes: 2 additions & 0 deletions scan_rr.go
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,8 @@ func (rr *RRSIG) parse(c *zlexer, o string) *ParseError {
return nil
}

func (rr *NXT) parse(c *zlexer, o string) *ParseError { return rr.NSEC.parse(c, o) }

func (rr *NSEC) parse(c *zlexer, o string) *ParseError {
l, _ := c.Next()
name, nameOk := toAbsoluteName(l.token, o)
Expand Down
13 changes: 9 additions & 4 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ func (rr *GPOS) String() string {
return rr.Hdr.String() + rr.Longitude + " " + rr.Latitude + " " + rr.Altitude
}

// LOC RR. See RFC RFC 1876.
// LOC RR. See RFC 1876.
type LOC struct {
Hdr RR_Header
Version uint8
Expand Down Expand Up @@ -898,6 +898,11 @@ func (rr *RRSIG) String() string {
return s
}

// NXT RR. See RFC 2535.
type NXT struct {
NSEC
}

// NSEC RR. See RFC 4034 and RFC 3755.
type NSEC struct {
Hdr RR_Header
Expand Down Expand Up @@ -982,7 +987,7 @@ func (rr *TALINK) String() string {
sprintName(rr.PreviousName) + " " + sprintName(rr.NextName)
}

// SSHFP RR. See RFC RFC 4255.
// SSHFP RR. See RFC 4255.
type SSHFP struct {
Hdr RR_Header
Algorithm uint8
Expand All @@ -996,7 +1001,7 @@ func (rr *SSHFP) String() string {
" " + strings.ToUpper(rr.FingerPrint)
}

// KEY RR. See RFC RFC 2535.
// KEY RR. See RFC 2535.
type KEY struct {
DNSKEY
}
Expand Down Expand Up @@ -1306,7 +1311,7 @@ type NINFO struct {

func (rr *NINFO) String() string { return rr.Hdr.String() + sprintTxt(rr.ZSData) }

// NID RR. See RFC RFC 6742.
// NID RR. See RFC 6742.
type NID struct {
Hdr RR_Header
Preference uint16
Expand Down
20 changes: 20 additions & 0 deletions zduplicate.go

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

30 changes: 30 additions & 0 deletions zmsg.go

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

6 changes: 6 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 4c06a1b

Please sign in to comment.