fix axfr for the example

This commit is contained in:
Miek Gieben 2011-04-18 19:50:05 +02:00
parent 4d61f9591f
commit 1cc16f01c8
1 changed files with 2 additions and 0 deletions

View File

@ -14,12 +14,14 @@ func main() {
// only UDP works atm
client := dns.NewClient()
client.Net = "tcp"
m := new(dns.Msg)
if *serial > 0 {
m.SetIxfr(zone, uint32(*serial))
} else {
m.SetAxfr(zone)
}
fmt.Printf("%v\n", m)
axfr, err := client.XfrReceive(m, *nameserver)
if err != nil {
println(err.String())