Compiling with DISABLE_NAGLE does not propogate tcp_proto_no and never sets TCP_NODELAY#3859
Open
davidtrihy-genesys wants to merge 1 commit intoOpenSIPS:3.6from
Open
Compiling with DISABLE_NAGLE does not propogate tcp_proto_no and never sets TCP_NODELAY#3859davidtrihy-genesys wants to merge 1 commit intoOpenSIPS:3.6from
davidtrihy-genesys wants to merge 1 commit intoOpenSIPS:3.6from
Conversation
…r sets TCP_NODELAY
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.
Summary
Compiling with DISABLE_NAGLE does not set tcp_proto_no on TCP worker processes which causes the setsockopt for TCP_NODELAY to not be set when creating sockets
Details
Bug fix with 3.6 where this compile time define does not work anymore
Solution
getprotobyname("tcp");is called intcp_bind_listenerwhich is only ever called in the TCP main process so thetcp_proto_nois always -1 in worker processes, the solution here was to just remove that call and useIPPROTO_TCPdirectly in thesetsockoptthe enums for the different protos innetinet/in.hare used in multiple different areas in the source code so changing TCP_NODELAY to use the enum directly matches the pattern of other socket optionsCompatibility
It will make 3.6 behave consistently when the compile time flag is set.