diff --git a/dns.go b/dns.go index 8fb865e1..d97eb92f 100644 --- a/dns.go +++ b/dns.go @@ -207,7 +207,9 @@ func (d *Conn) Exchange(request []byte, nosend bool) (reply []byte, err os.Error reply = make([]byte, DefaultMsgSize) } n, err = d.Read(reply) + println("READ ", n) if err != nil { + println(err.String()) return nil, err } reply = reply[:n] diff --git a/msg.go b/msg.go index 906e6bf6..cc1ab7c0 100644 --- a/msg.go +++ b/msg.go @@ -16,7 +16,7 @@ package dns import ( "os" - "fmt" + // "fmt" "reflect" "net" "rand" @@ -210,7 +210,6 @@ func unpackDomainName(msg []byte, off int) (s string, off1 int, ok bool) { Loop: for { if off >= len(msg) { - println(off, len(msg)) return "", len(msg), false } c := int(msg[off]) @@ -658,7 +657,7 @@ func unpackStructValue(val *reflect.StructValue, msg []byte, off int) (off1 int, case "domain-name": s, off, ok = unpackDomainName(msg, off) if !ok { - fmt.Fprintf(os.Stderr, "dns: failure unpacking domain-name") + //fmt.Fprintf(os.Stderr, "dns: failure unpacking domain-name") return len(msg), false } case "size-base32":