From c33e37f38df80f876d526945f4c284b666e41622 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Tue, 22 Jan 2013 16:42:06 +0100 Subject: [PATCH 1/2] Subnet stuff --- ex/reflect/reflect.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ex/reflect/reflect.go b/ex/reflect/reflect.go index e9b824a4..56586276 100644 --- a/ex/reflect/reflect.go +++ b/ex/reflect/reflect.go @@ -73,10 +73,10 @@ func handleReflect(w dns.ResponseWriter, r *dns.Msg) { } if o := r.IsEdns0(); o != nil { - for _, s := range o.Options { - switch e = s.(type) { + for _, s := range o.Option { + switch e := s.(type) { case *dns.EDNS0_SUBNET: - println("SUBNET") + log.Printf("Edns0 subnet %s", e.Address) } } } From ababac6b57ef231d26d7fc628403c63d94b4340b Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Thu, 24 Jan 2013 20:46:07 +0100 Subject: [PATCH 2/2] Exclude msg.Compress from json --- msg.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msg.go b/msg.go index 294164ed..976deb74 100644 --- a/msg.go +++ b/msg.go @@ -69,7 +69,7 @@ type MsgHdr struct { // The layout of a DNS message. type Msg struct { MsgHdr - Compress bool // If true, the message will be compressed when converted to wire format. + Compress bool `json:"-"` // If true, the message will be compressed when converted to wire format. Question []Question // Holds the RR(s) of the question section. Answer []RR // Holds the RR(s) of the answer section. Ns []RR // Holds the RR(s) of the authority section.