Re: binding UDP port 0 with SO_REUSEADDR
From: Eric Dumazet <hidden>
Date: 2012-08-01 19:03:00
On Wed, 2012-08-01 at 13:36 +0200, Tobias S. Josefowitz wrote:
Hey all, I recently noticed that binding UDP port 0 with SO_REUSEADDR yields unexpected results for me - the kernel occasionally gives out UDP ports used by other processes, if they were bound with SO_REUSEADDR, too. I did some digging, it seems that f24d43c07e208372aa3d3bff419afbf43ba87698 introduced this behaviour. I'm not at all sure if this could/should be called a bug, but I need to say, it was severly unexpected at my side, and that probably goes for others, too. Just bringing this to your attention, I have no suggestions on it whatsoever.
And why are you using SO_REUSEADDR on UDP unicast sockets ? I mean, this is exactly saying " By using this REUSEADDR, I am allowing this port being used by another process, even from another user"