8000 Allow SO_REUSEADDR and SO_REUSEPORT to be set simultaneously by rtpt-erikgeiser · Pull Request #1623 · miekg/dns · GitHub
[go: up one dir, main page]

Skip to content

Conversation

rtpt-erikgeiser
Copy link
Contributor

Currently it is impossible to set both SO_REUSEADDR and SO_REUSEPORT simultaneously. If a user tries to set both, there is no error and none of the options are actually set which can be quite confusing.

This PR not only fixes this but adds a test for all combinations of the socket options. In contrast to the existing tests for SO_REUSEADDR and SO_REUSEPORT, this test does not check that the options do what they are supposed to do (this is the kernels responsibility) but it tests whether or not the options are actually set as requested by the user (which is the library's responsibility).

@miekg
Copy link
Owner
miekg commented Jan 24, 2025

looks like a nice addition thanks!

@miekg miekg merged commit cbe4275 into miekg:master Jan 24, 2025
baest pushed a commit to baest/dns that referenced this pull request Mar 5, 2025
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
0