IPv6 works ago. Updated the tests

This commit is contained in:
Miek Gieben 2011-02-21 18:23:39 +01:00
parent 614709d3e4
commit 983ccc7909
2 changed files with 29 additions and 11 deletions

16
TODO
View File

@ -1,28 +1,22 @@
Todo:
* wildcards, in sig gen, sig checking
* Private key file parsing use io.Reader (or the like) - NewReader, NewWriter?
* Test impl of nameserver, with a small zone, 1 KSK and online signing
* Tsig generation for replies (request MAC)
* nsupdate
* escaped dots in names \.
Longer term:
* Parsing from strings, going with goyacc and own lexer
* Multi line output?
* NSEC and nsec3 closest encloser helper functions
* pack/Unpack smaller. EDNS 'n stuff can be folded in
* Test impl of nameserver, with a small zone, 1 KSK and online signing
Issues:
* escaped dots in names \.
* quoted quotes in txt records
* Check the network order, it works now, but this is on Intel
* Check the network order, it works now, but this is on Intel??
* Make the testsuite work with public DNS servers
* shortened ipv6 addresses are not parsed correctly (maybe net issue)
* Convenience functions? Not sure if I want them??
- NXDomain pkt
- FormErr pkt
- for new(RR*)
- nsupdate
Funkensturm:
* use exp/eval - to inteprete the config file??
* TCP how to handle stuff like AXFR
* TCP: how to handle stuff like AXFR
* use package log

View File

@ -2,6 +2,7 @@ package dns
import (
"fmt"
"net"
"testing"
"crypto/rsa"
)
@ -112,3 +113,26 @@ Activate: 20110109154937`
sig.Sign(p, []RR{soa})
fmt.Printf("%v\n%v\n%v\n", k, soa, sig)
}
func TestA(t *testing.T) {
a := new(RR_A)
a.Hdr = RR_Header{"miek.nl.", TypeA, ClassINET, 14400, 0}
a.A = net.ParseIP("192.168.1.1")
str := a.String()
if str != "miek.nl.\t14400\tIN\tA\t192.168.1.1" {
t.Log(str)
t.Fail()
}
}
func TestQuadA(t *testing.T) {
a := new(RR_AAAA)
a.Hdr = RR_Header{"miek.nl.", TypeAAAA, ClassINET, 14400, 0}
a.AAAA = net.ParseIP("::1")
str := a.String()
if str != "miek.nl.\t14400\tIN\tAAAA\t::1" {
t.Log(str)
t.Fail()
}
}