Skip to content
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

fix(s2n-quic-platform): disable REUSEADDR by default #2110

Merged
merged 3 commits into from
Feb 7, 2024

Conversation

camshaft
Copy link
Contributor

@camshaft camshaft commented Feb 7, 2024

Description of changes:

The socket creation code currently defaults to setting SO_REUSEADDR. This isn't ideal as the OS can decide to reassign the socket's port. It also is basically non-portable and behaves differently across platforms (see https://stackoverflow.com/questions/14388706/how-do-so-reuseaddr-and-so-reuseport-differ).

This change defaults to disabling the option, with a configuration method to opt-in if an application needs it.

Callouts:

The perf scripts were leaving a s2n-quic-qns process around after execution, which was hidden by the use of REUSEADDR. I've fixed those scripts to use exec which now cleans them up properly.

Testing:

All of the existing end-to-end tests should continue to function just fine, since we were never utilizing the REUSEADDR functionality in the first place.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@camshaft camshaft force-pushed the camshaft/reuse-addr branch 2 times, most recently from 19037a4 to ce2206a Compare February 7, 2024 10:04
@camshaft camshaft force-pushed the camshaft/reuse-addr branch from ce2206a to 336a8dd Compare February 7, 2024 10:11
@camshaft camshaft marked this pull request as ready for review February 7, 2024 10:21
@camshaft camshaft force-pushed the camshaft/reuse-addr branch from 6e47047 to 00bc82b Compare February 7, 2024 17:02
@camshaft camshaft merged commit 7649cba into main Feb 7, 2024
119 of 120 checks passed
@camshaft camshaft deleted the camshaft/reuse-addr branch February 7, 2024 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants