The address returned by recvFrom in the socket module is always (0.0.0.0, 0). The relevant code is:
IPEndPoint remoteIPEP = new IPEndPoint(IPAddress.Any, 0);
EndPoint remoteEP = remoteIPEP;
bytesRead = socket.ReceiveFrom(buffer, (SocketFlags)flags, ref remoteEP);
358: Tuple remoteAddress = EndPointToTuple(remoteIPEP);
return Tuple.MakeTuple(data, remoteAddress);
The Tuple returned by recvFrom is created using the IPEndPoint reference remoteIPEP. Although the EndPoint reference remoteEP points to this initially, it is passed in to socket.ReceiveFrom() as a ref parameter, and so can (and does) point to a new object afterwards.
Solution is to add the following line before line 358 as marked above:
remoteIPEP = (IPEndPoint) remoteEP;
I've tested this solution out and it works ok.