feat: RFC-8427 #171

Merged
sam merged 16 commits from RFC-8427 into master 2022-12-27 20:07:09 +00:00
Showing only changes of commit cfc4d09003 - Show all commits

View file

@ -12,13 +12,13 @@ import (
"golang.org/x/net/idna"
)
var (
ttl any
name string
err error
)
func (message *Message) displayQuestion(msg *dns.Msg, opts *util.Options, opt *dns.OPT) error {
var (
name string
err error
)
for _, question := range msg.Question {
if opts.Display.UcodeTranslate {
name, err = idna.ToUnicode(question.Name)
@ -40,6 +40,13 @@ func (message *Message) displayQuestion(msg *dns.Msg, opts *util.Options, opt *d
}
func (message *Message) displayAnswers(msg *dns.Msg, opts *util.Options, opt *dns.OPT) error {
var (
ttl any
name string
err error
)
for _, answer := range msg.Answer {
temp := strings.Split(answer.String(), "\t")
@ -77,6 +84,13 @@ func (message *Message) displayAnswers(msg *dns.Msg, opts *util.Options, opt *dn
}
func (message *Message) displayAuthority(msg *dns.Msg, opts *util.Options, opt *dns.OPT) error {
var (
ttl any
name string
err error
)
for _, ns := range msg.Ns {
temp := strings.Split(ns.String(), "\t")
@ -114,6 +128,13 @@ func (message *Message) displayAuthority(msg *dns.Msg, opts *util.Options, opt *
}
func (message *Message) displayAdditional(msg *dns.Msg, opts *util.Options, opt *dns.OPT) error {
var (
ttl any
name string
err error
)
for _, additional := range msg.Extra {
if additional.Header().Rrtype == dns.StringToType["OPT"] {
continue