add edns0 test
This commit is contained in:
parent
81c4befb1e
commit
55a459b61c
3
TODO
3
TODO
|
@ -4,9 +4,6 @@ Issues:
|
||||||
* Make the testsuite work with public DNS servers
|
* Make the testsuite work with public DNS servers
|
||||||
* pack/Unpack smaller. EDNS 'n stuff can be folded in???
|
* pack/Unpack smaller. EDNS 'n stuff can be folded in???
|
||||||
* Compression. Take stuff from Jan Mercl
|
* Compression. Take stuff from Jan Mercl
|
||||||
o Tsig will probably become an interface which has all configuration
|
|
||||||
stuff, but this will come later. Config which has Tsig function
|
|
||||||
-- get TSIG working in xfrprx and see how that impact the package.
|
|
||||||
|
|
||||||
XfrWriter
|
XfrWriter
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@ func TestClientSync(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func helloMiek(w RequestWriter, r *Msg) {
|
func helloMiek(w RequestWriter, r *Msg) {
|
||||||
w.Send(r)
|
w.Send(r)
|
||||||
reply, _ := w.Receive()
|
reply, _ := w.Receive()
|
||||||
|
@ -50,12 +49,10 @@ forever:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestClientEDNS
|
func TestClientEDNS0(t *testing.T) {
|
||||||
/*
|
m := new(Msg)
|
||||||
func TestResolverEdns(t *testing.T) {
|
m.SetQuestion("miek.nl", TypeDNSKEY)
|
||||||
|
|
||||||
|
|
||||||
// Add EDNS rr
|
|
||||||
edns := new(RR_OPT)
|
edns := new(RR_OPT)
|
||||||
edns.Hdr.Name = "." // must . be for edns
|
edns.Hdr.Name = "." // must . be for edns
|
||||||
edns.Hdr.Rrtype = TypeOPT
|
edns.Hdr.Rrtype = TypeOPT
|
||||||
|
@ -66,21 +63,18 @@ func TestResolverEdns(t *testing.T) {
|
||||||
edns.Option = make([]Option, 1)
|
edns.Option = make([]Option, 1)
|
||||||
edns.SetNsid("") // Empty to request it
|
edns.SetNsid("") // Empty to request it
|
||||||
|
|
||||||
// ask something
|
|
||||||
m.Question[0] = Question{"powerdns.nl", TypeDNSKEY, ClassINET}
|
|
||||||
m.Extra = make([]RR, 1)
|
m.Extra = make([]RR, 1)
|
||||||
m.Extra[0] = edns
|
m.Extra[0] = edns
|
||||||
|
|
||||||
in, _ := res.Query(m)
|
c := NewClient()
|
||||||
if in != nil {
|
r := c.Exchange(m, "85.223.71.124:53")
|
||||||
if in.Rcode != RcodeSuccess {
|
|
||||||
t.Logf("%v\n", in)
|
if r != nil && r.Rcode != RcodeSuccess {
|
||||||
t.Log("Failed to get an valid answer")
|
t.Log("Failed to get an valid answer")
|
||||||
t.Fail()
|
t.Fail()
|
||||||
}
|
t.Logf("%v\n", r)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
func TestClientTsigAXFR(t *testing.T) {
|
func TestClientTsigAXFR(t *testing.T) {
|
||||||
m := new(Msg)
|
m := new(Msg)
|
||||||
|
|
Loading…
Reference in New Issue