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) }
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) } }