diff --git a/dns_test.go b/dns_test.go index bc8361f0..d5127bf2 100644 --- a/dns_test.go +++ b/dns_test.go @@ -111,6 +111,8 @@ func TestPack(t *testing.T) { t.Fail() } } + ns := NewRR("pool.ntp.org. 390 IN NS a.ntpns.org") + t.Log("ns", ns.String()) } func TestCompressLenght(t *testing.T) { diff --git a/server.go b/server.go index fa4eabad..1eef6034 100644 --- a/server.go +++ b/server.go @@ -141,9 +141,9 @@ func (mux *ServeMux) HandleRemove(pattern string) { func (mux *ServeMux) ServeDNS(w ResponseWriter, request *Msg) { var h Handler if len(request.Question) != 1 { - h = FailedHander() + h = FailedHandler() } else { - if h = mux.match(request.Question[0].Name, request.Question[0].Qtype); h == nil + if h = mux.match(request.Question[0].Name, request.Question[0].Qtype); h == nil { h = FailedHandler() } }