Thread (7 messages) flat view 7 messages, 3 authors, 2012-08-21

Re: binding UDP port 0 with SO_REUSEADDR

From: Tobias S. Josefowitz <hidden>
Date: 2012-08-02 16:33:44

Hi again,

I need to say, after looking at "my" socket(7),

       SO_REUSEADDR
              Indicates  that  the rules used in validating addresses supplied
              in a bind(2) call should allow reuse of  local  addresses.   For
              AF_INET  sockets  this means that a socket may bind, except when
              there is an active listening socket bound to the address.   When
              the listening socket is bound to INADDR_ANY with a specific port
              then it is not possible to bind  to  this  port  for  any  local
              address.  Argument is an integer boolean flag.

I think the surprise-factor of the bind-0-behaviour even increased for
me. Is there a specific reason for handing out used ports when binding
port 0 with REUSEADDR?

Best,

Tobi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help