netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phillip Susi <psusi@ubuntu.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: bind() should not return -EADDRINUSE
Date: Thu, 11 Dec 2014 16:34:14 -0500	[thread overview]
Message-ID: <548A0DD6.3020702@ubuntu.com> (raw)
In-Reply-To: <20141211.152518.1988079810884987306.davem@davemloft.net>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/11/2014 3:25 PM, David Miller wrote:
> You will definitely break programs that look for a locally
> available port by iterating over bind() calls.
> 
> Sorry, this is not changing, no matter how strongly you may wish
> it to.

According to this very nice post, it is how BSD does it, at least when
you specify SO_REUSEADDR:

http://stackoverflow.com/a/14388707/884259

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)

iQEcBAEBAgAGBQJUig3WAAoJENRVrw2cjl5ROzkIAJMyXGo6OA34TFz2pXlWUlLR
+aA6UGC99oM6QV0y/sFnRGSlp4tIMTUQuFS7JzVCKHNRbm9dixtTdXLKpinBuUw/
Y1ZIO1+DyV457T05Q7w9oBxxxNqdLCRlLnVxolTiLN5IJ0mkEN+CaVJVuSl/Tx+S
YtEmCyDShpE+xwQndOUQtt0WU2ZonrKGhYH1aA6YRSyxfX1N4vTuSKqCUvsSubfm
r3tt22A6FaRey0pHzxSqzNcyvHe63THC8b556ggOcQM+yFf3C92FNyvyUWxETtdb
2VrXgGEYnXtcLXtSwYLOnQAXwW9yRg64BkinMDybVt7b6aNDG5653+Vi/NniysU=
=NxIM
-----END PGP SIGNATURE-----

      reply	other threads:[~2014-12-11 21:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-11 19:19 bind() should not return -EADDRINUSE Phillip Susi
2014-12-11 19:23 ` David Miller
2014-12-11 19:50   ` Phillip Susi
2014-12-11 20:13     ` David Miller
2014-12-11 20:17       ` Phillip Susi
2014-12-11 20:18         ` David Miller
2014-12-11 20:23           ` Phillip Susi
2014-12-11 20:25             ` David Miller
2014-12-11 21:34               ` Phillip Susi [this message]

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=548A0DD6.3020702@ubuntu.com \
    --to=psusi@ubuntu.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).