Skip to content

Commit

Permalink
Add CSYNC support (#371)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Stirnimann <[email protected]>
  • Loading branch information
stirnim and Daniel Stirnimann committed May 30, 2024
1 parent 736b1ca commit c889e07
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pkg/miekg/answers.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ type CERTAnswer struct {
Certificate string `json:"certificate" groups:"short,normal,long,trace"`
}

type CSYNCAnswer struct {
Answer
Serial uint32 `json:"serial" groups:"short,normal,long,trace"`
Flags uint16 `json:"flags" groups:"short,normal,long,trace"`
TypeBitMap string `json:"type_bit_map" groups:"short,normal,long,trace"`
}

type DNSKEYAnswer struct {
Answer
Flags uint16 `json:"flags" groups:"short,normal,long,trace"`
Expand Down Expand Up @@ -767,6 +774,13 @@ func ParseAnswer(ans dns.RR) interface{} {
Algorithm: cAns.Algorithm,
PublicKey: cAns.PublicKey,
}
case *dns.CSYNC:
return CSYNCAnswer{
Answer: makeBaseAnswer(&cAns.Hdr, ""),
Serial: cAns.Serial,
Flags: cAns.Flags,
TypeBitMap: makeBitString(cAns.TypeBitMap),
}
case *dns.AFSDB:
return AFSDBAnswer{
Answer: makeBaseAnswer(&cAns.Hdr, ""),
Expand Down

0 comments on commit c889e07

Please sign in to comment.