I've just realised that this one returns the address of the loopback interface on Linux while it returns a more logical value on Mac OS X (the eth1 interface).
For the purpose of this test, this makes absolutely no differences, as both server and client are running on the same machine.