On Thu, 2012-08-09 at 11:40 +0200, Jesper Dangaard Brouer wrote:
Yes, I guess its an application bug, because Berkely-derived
implementations don't handle multihomeing well for UDP.
Why are we keeping this, counter-intuitive behavior?
Because the BSD api has no other choice.
What about changing the implementation to act like Solaris, which IMHO
makes much more sense?
(BTW, iperf also have this "bug")
Please describe how connect() is able to correctly chose for you a
source address, if you have say 256 addresses.
connect() API only requires the destination.
If you want a precise source, you must use bind() before the connect()
Any UDP application wanting to correctly reflect "correct source IP"
must say so to the kernel.
I dont think kernel could magically help here, really.