more printing tweaks for OPT
This commit is contained in:
parent
e32a3784f2
commit
e5a394b97e
|
@ -79,7 +79,6 @@ func TestPackUnpack(t *testing.T) {
|
|||
}
|
||||
|
||||
edns := new(RR_OPT)
|
||||
edns.Hdr.Edns = true
|
||||
edns.Hdr.Name = "."
|
||||
edns.Hdr.Rrtype = TypeOPT
|
||||
edns.Hdr.Class = ClassINET
|
||||
|
|
|
@ -21,7 +21,6 @@ func TestResolverEdns(t *testing.T) {
|
|||
|
||||
// Add EDNS rr
|
||||
edns := new(RR_OPT)
|
||||
edns.Hdr.Edns = true // must be set for edns
|
||||
edns.Hdr.Name = "." // must . be for edns
|
||||
edns.Hdr.Rrtype = TypeOPT
|
||||
edns.Hdr.Class = ClassINET
|
||||
|
|
3
types.go
3
types.go
|
@ -120,7 +120,6 @@ func (q *Question) String() string {
|
|||
// There are many types of messages,
|
||||
// but they all share the same header.
|
||||
type RR_Header struct {
|
||||
Edns bool // true is this a edns header
|
||||
Name string "domain-name"
|
||||
Rrtype uint16
|
||||
Class uint16
|
||||
|
@ -135,7 +134,7 @@ func (h *RR_Header) Header() *RR_Header {
|
|||
func (h *RR_Header) String() string {
|
||||
var s string
|
||||
|
||||
if h.Edns {
|
||||
if h.Rrtype == TypeOPT {
|
||||
s = ";"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue