From b5c6ec8e5f987e5e3438f35bf52c3ccc50fc19f4 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Sat, 17 Dec 2011 20:14:10 +0100 Subject: [PATCH] Remove the non-working RawSetRdlength Didn't work --- rawmsg.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rawmsg.go b/rawmsg.go index 38a2939d..140805fa 100644 --- a/rawmsg.go +++ b/rawmsg.go @@ -12,11 +12,15 @@ package dns // If buf does not look like a DNS message false is returned, // otherwise true. func (h *RR_Header) RawSetRdlength(buf []byte, off int) bool { + println(h.Name) off1 := DomainNameLength(h.Name) + println("Lengte", off1) + println("len(buf)", len(buf)) + println("off", off+off1+2+2+4+1) if off1 == 0 || len(buf) < off+off1+2+2+4+1 { return false } - // + type(2) + class(2) + ttl(4) is where rdlength it at + // + type(2) + class(2) + ttl(4) is where rdlength is at buf[off+off1+2+2+4], buf[off+off1+2+2+4+1] = packUint16(h.Rdlength) return true }