This commit is contained in:
Miek Gieben 2012-08-08 12:58:09 +02:00
parent cc33ab2a70
commit 648e765d31
2 changed files with 8 additions and 8 deletions

View File

@ -3,8 +3,8 @@ package main
import (
"dns"
"fmt"
"log"
"github.com/miekg/radix"
"log"
"strings"
"time"
)

View File

@ -11,19 +11,19 @@ import (
)
var (
listen = flag.String("listen", "127.0.0.1:8053", "set the listener address")
server = flag.String("server", "127.0.0.1:53", "remote server address")
flagttl = flag.Int("ttl", 30, "ttl (in seconds) for cached packets")
flaglog = flag.Bool("log", false, "be more verbose")
listen = flag.String("listen", "127.0.0.1:8053", "set the listener address")
server = flag.String("server", "127.0.0.1:53", "remote server address")
flagttl = flag.Int("ttl", 30, "ttl (in seconds) for cached packets")
flaglog = flag.Bool("log", false, "be more verbose")
)
func serve(w dns.ResponseWriter, r *dns.Msg, c *Cache) {
// Check for "special queries"
switch {
case r.IsNotify():
if *flaglog {
log.Printf("fks-shield: notify/update")
}
if *flaglog {
log.Printf("fks-shield: notify/update")
}
fallthrough
case r.IsUpdate():
client := new(dns.Client)