[ISSUE-95] Send replies from the right source IP address

Fixes #95

I didn't test this enough, but lets see what you have to say about it :)
I tried to keep it as simple as possible.

This has to be tested with IPv6. I guess that IPv6 is not supported yet (shouldn't be too hard to add IPv6 support though), but first lets make sure it doesn't break it.
Re 2. OK that's true.
On 7 Jul 2014 18:30, "Omri Bahumi" <notifications@github.com> wrote:

> In server.go:
>
> > @@ -44,9 +44,10 @@ type response struct {
> >  	tsigTimersOnly bool
> >  	tsigRequestMAC string
> >  	tsigSecret     map[string]string // the tsig secrets
> > -	udp            *net.UDPConn      // i/o connection if UDP was used
> > -	tcp            *net.TCPConn      // i/o connection if TCP was used
> > -	remoteAddr     net.Addr          // address of the client
> > +	udp            *UDPConn          // i/o connection if UDP was used
>
>
>    1. I'll try to give this another look
>    2. The memory overhead is 32 bytes (allocating for the worst case,
>    which is IPv6). I suggest we don't struggle too much to keep this code out
>    for other cases. Let me remind you that if it breaks something, it'll break
>    it right away and not just for edge cases, so a basic sanity should cover
>    it. I hope that this library's users test their code before deploying it to
>    production :)
>    3. Ok
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/miekg/dns/pull/96/files#r14609741>.
>