Hi All,
TLDR: This error might happens because you don't reuse the listening Conn object.
Edit : Turns out morten is already saying the same thing :)
I was also having the same problem. After some debugging, I discovered that the problem is because the reference implementation actually considers the "source port" field of the UDP packet (see here) as authoritative. I think it's because this field is returned as the second return value when you call golang UDP read function.
If the RelayPeerAddr and the "source port" differs, the reference implementation will think that the message is sent from the "source port". This results in the reference implementation relaying the message back to the RelayPeerAddr.
So, this happens when you don't reuse the Conn object that you use for listening when sending the packet. In this case, the laddr of the new Conn object will be assigned an ephemeral port which differs from your gossiper address. My implementation pass all the tests after I made this change. I know we might worry whether it is "safe", but it turns out the Conn object is designed to be called from multiple coroutine according to the documentation.
I hope it helps.
Reka