From: Eric Dumazet <eric.dumazet@gmail.com>
To: "Tobias S. Josefowitz" <t.josefowitz@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: binding UDP port 0 with SO_REUSEADDR
Date: Thu, 02 Aug 2012 18:57:25 +0200 [thread overview]
Message-ID: <1343926645.9299.303.camel@edumazet-glaptop> (raw)
In-Reply-To: <CAEZM=bM=AGp=FOxLiDiBFgVJWGmNdPpG_FV3Ne2i5jeALiB4YA@mail.gmail.com>
On Thu, 2012-08-02 at 18:33 +0200, Tobias S. Josefowitz wrote:
> 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?
There is no concept of listening sockets for UDP.
This documentation applies for TCP, and makes no sense for UDP.
There is no value using 'port 0' and REUSEADDR on UDP, really.
next prev parent reply other threads:[~2012-08-02 16:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-01 11:36 binding UDP port 0 with SO_REUSEADDR Tobias S. Josefowitz
2012-08-01 19:02 ` Eric Dumazet
2012-08-01 19:38 ` Tobias S. Josefowitz
2012-08-02 16:33 ` Tobias S. Josefowitz
2012-08-02 16:57 ` Eric Dumazet [this message]
2012-08-02 19:05 ` Tobias S. Josefowitz
2012-08-21 9:09 ` Jan Engelhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1343926645.9299.303.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=t.josefowitz@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox