ares_socket: set IP_BIND_ADDRESS_NO_PORT on ares_set_local_ip* tcp sockets#887
Merged
bradh352 merged 1 commit intoc-ares:mainfrom Sep 24, 2024
Merged
ares_socket: set IP_BIND_ADDRESS_NO_PORT on ares_set_local_ip* tcp sockets#887bradh352 merged 1 commit intoc-ares:mainfrom
bradh352 merged 1 commit intoc-ares:mainfrom
Conversation
bradh352
requested changes
Sep 24, 2024
Member
bradh352
left a comment
There was a problem hiding this comment.
Can you use the same pattern as SO_NOSIGPIPE? int opt = 1; and pass that in instead of the form you're using?
Contributor
Author
|
ook. compound literals are valid c99 thou.. |
Member
we use ANSI C89 / ISO C90 still which is why compilation generates these warnings: |
b7b044c to
e3aa141
Compare
…ckets If you bind to a local address, you now only have approx 32k possible source ports to initiate connections. In modern days that can quickly run out. setting IP_BIND_ADDRESS_NO_PORT let's the kernel choose a port at connect time, increasing the limit of combinations to around a million.
e3aa141 to
d1da617
Compare
Contributor
Author
|
ok fixed now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If you bind to a local address, you now only have approx 32k possible source ports to initiate connections.
In modern days that can quickly run out.
setting IP_BIND_ADDRESS_NO_PORT let's the kernel choose a port at connect time, increasing the limit of combinations to around a million.