8000 bpo-37228: Fix loop.create_datagram_endpoint()'s usage of SO_REUSEADDR by aeros · Pull Request #17311 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-37228: Fix loop.create_datagram_endpoint()'s usage of SO_REUSEADDR #17311

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Prev Previous commit
Next Next commit
Make description of security concern more explicit
  • Loading branch information
aeros committed Nov 25, 2019
commit 92cf3010ef15428c9218eb5cd5a4460a8790f1f4
12 changes: 10 additions & 2 deletions Doc/library/asyncio-eventloop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -477,8 +477,16 @@ Opening network connections
The parameter *reuse_address* is no longer supported, as using
:py:data:`~sockets.SO_REUSEADDR` poses a significant security concern for
UDP. Explicitly passing ``reuse_address=True`` will raise an exception.
For supported platforms, *reuse_port* can be used instead for similar
functionality.

When multiple processes with differing UIDs assign sockets to an
indentical UDP socket address with ``SO_REUSEADDR``, incoming packets can
become randomly distributed among the sockets.

For supported platforms, *reuse_port* can be used as a replacement for
similar functionality. With *reuse_port*,
:py:data:`~sockets.SO_REUSEPORT` is used instead, which specifically
prevents processes with differing UIDs from assigning sockets to the same
socket address.

Create a datagram connection.

Expand Down
0