Skip to content

Core: change TCP keepalive from ms to seconds on DragonFly BSD #258

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
merged 1 commit into from
Nov 18, 2024

Conversation

panjf2000
Copy link
Contributor

Proposed changes

DragonFly BSD has changed the time unit for TCP keep-alive from milliseconds to seconds since 5.7 development patch 2, thus setting the keepalive options in milliseconds on DragonFlyBSD 5.8+ will cause the values to be magnified by a factor of a thousand.

Fix it by distinguishing the DragonFly BSD versions and use the proper time units accordingly.

Ref:
https://mailman.nginx.org/pipermail/nginx-devel/2013-July/003980.html
https://lists.dragonflybsd.org/pipermail/commits/2019-July/719125.html
https://github.com/DragonFlyBSD/DragonFlyBSD/blob/965b380e960908836b97aa034fa2753091e0172e/sys/sys/param.h#L207
https://www.dragonflybsd.org/release58/

@panjf2000
Copy link
Contributor Author

Could somebody take a look at this? @arut @pluknet

@panjf2000
Copy link
Contributor Author

Kindly ping... @arut @pluknet

@pluknet
Copy link
Contributor

pluknet commented Oct 25, 2024

I will look when time permits.

@pluknet pluknet force-pushed the dragonfly-tcpkeepalive branch from 1774a79 to dd57c04 Compare November 18, 2024 18:22
@pluknet
Copy link
Contributor

pluknet commented Nov 18, 2024

Thanks for the patch.
I'm going to merge it with the above cosmetic changes applied.

@pluknet pluknet merged commit 7cd60cd into nginx:master Nov 18, 2024
1 check passed
@panjf2000 panjf2000 deleted the dragonfly-tcpkeepalive branch November 18, 2024 23:19
@Maryna-f5 Maryna-f5 added this to the nginx-1.27.3 milestone Nov 19, 2024
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.

4 participants