fix edns0 and thus dnssec
This commit is contained in:
parent
83817a219b
commit
af63a2f45d
|
@ -107,16 +107,7 @@ Flags:
|
||||||
m.MsgHdr.RecursionDesired = *rd
|
m.MsgHdr.RecursionDesired = *rd
|
||||||
m.Question = make([]dns.Question, 1)
|
m.Question = make([]dns.Question, 1)
|
||||||
if *dnssec || *nsid {
|
if *dnssec || *nsid {
|
||||||
opt := dns.NewRR(dns.TypeOPT).(*dns.RR_OPT)
|
m.SetEdns0(dns.DefaultMsgSize, true)
|
||||||
opt.Hdr.Rrtype = 0
|
|
||||||
opt.SetDo()
|
|
||||||
opt.SetVersion(0)
|
|
||||||
opt.SetUDPSize(dns.DefaultMsgSize)
|
|
||||||
if *nsid {
|
|
||||||
opt.SetNsid("")
|
|
||||||
}
|
|
||||||
m.Extra = make([]dns.RR, 1)
|
|
||||||
m.Extra[0] = opt
|
|
||||||
}
|
}
|
||||||
for _, v := range qname {
|
for _, v := range qname {
|
||||||
m.Question[0] = dns.Question{v, qtype, qclass}
|
m.Question[0] = dns.Question{v, qtype, qclass}
|
||||||
|
|
Loading…
Reference in New Issue