some more fixes

This commit is contained in:
Miek Gieben 2011-03-30 19:17:14 +02:00
parent 9582fd005a
commit beb14241fc
3 changed files with 3 additions and 2 deletions

View File

@ -13,6 +13,7 @@ func handleXfrOut(d *dns.Conn, i *dns.Msg) os.Error {
fmt.Printf("Matchies current zone\n")
if !Zone.correct {
fmt.Printf("Zone was not deemed correct\n")
d.WriteMsg(i)
return nil
} else {
fmt.Printf("Zone was correct\n")
@ -31,6 +32,7 @@ func handleXfrOut(d *dns.Conn, i *dns.Msg) os.Error {
close(m)
} else {
fmt.Printf("No matching zone found\n")
d.WriteMsg(i)
}
}
return nil

View File

@ -37,7 +37,7 @@ func handle(d *dns.Conn, i *dns.Msg) {
handleXfrOut(d, i)
if Zone.name != "" {
// We have transfered a zone and can check it. For now assume ok.
Zone.correct = true
Zone.correct = false
}
}

1
xfr.go
View File

@ -149,7 +149,6 @@ func (d *Conn) axfrWrite(q *Msg, m chan *Xfr, e chan os.Error) {
// Everything is sent, only the closing soa is left.
out.Answer[i] = soa
out.Answer = out.Answer[:i+1]
println("Sending", out.String())
err := d.WriteMsg(out)
if err != nil {
e <- err