Exemple #1
0
func handle(c *dns.Conn, in *dns.Msg) {
	if in.MsgHdr.Response == true {
		return // We don't do responses
	}
	answer := reply(c, in)
	c.Write(answer)
}
Exemple #2
0
func reply(c *dns.Conn, i *dns.Msg) {
	out, err := doFunkensturm(i)
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error: %s\n", err.String())
		return
	}
	if out != nil {
		c.Write(out)
	}
}