From f2aff624fc8331a99f54097539f7ebd5bf2e1c87 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Thu, 22 Jan 2015 09:01:49 +0000 Subject: [PATCH] Fix SetIxfr Making a ixfr message requires a complete SOA. Add to paramaters to SetIxfr: Ns and Mbox that will be used in the SOA in the msg. --- defaults.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/defaults.go b/defaults.go index 0c8fa9c8..d77cb01d 100644 --- a/defaults.go +++ b/defaults.go @@ -73,13 +73,15 @@ func (dns *Msg) SetUpdate(z string) *Msg { } // SetIxfr creates message for requesting an IXFR. -func (dns *Msg) SetIxfr(z string, serial uint32) *Msg { +func (dns *Msg) SetIxfr(z string, serial uint32, ns, mbox string) *Msg { dns.Id = Id() dns.Question = make([]Question, 1) dns.Ns = make([]RR, 1) s := new(SOA) s.Hdr = RR_Header{z, TypeSOA, ClassINET, defaultTtl, 0} s.Serial = serial + s.Ns = ns + s.Mbox = mbox dns.Question[0] = Question{z, TypeIXFR, ClassINET} dns.Ns[0] = s return dns