Skip to content

dragonfly: change tcp keepalive options from ms to seconds#13848

Closed
panjf2000 wants to merge 2 commits intocurl:masterfrom
panjf2000:dragonfly-tcpkeepalive
Closed

dragonfly: change tcp keepalive options from ms to seconds#13848
panjf2000 wants to merge 2 commits intocurl:masterfrom
panjf2000:dragonfly-tcpkeepalive

Conversation

@panjf2000
Copy link
Contributor

DragonFly BSD changed the time unit for TCP keep-alive from milliseconds to seconds since v5.8, thus setting the keepalive options with milliseconds with curl/libcurl will result in unexpected behaviors on DragonFlyBSD 5.8+

Distinguish the DragonFly BSD versions and use the proper time units accordingly.

Ref:
https://lists.dragonflybsd.org/pipermail/commits/2019-July/719125.html
https://github.com/DragonFlyBSD/DragonFlyBSD/blob/965b380e960908836b97aa034fa2753091e0172e/sys/sys/param.h#L207

Fixes #13847

DragonFly BSD changed the time unit for TCP keep-alive from milliseconds to seconds since v5.8,
thus setting the keepalive options with milliseconds with curl/libcurl will result in unexpected
behaviors on DragonFlyBSD 5.8+

Distinguish the DragonFly BSD versions and use the proper time units accordingly.

Ref:
  https://lists.dragonflybsd.org/pipermail/commits/2019-July/719125.html
  https://github.com/DragonFlyBSD/DragonFlyBSD/blob/965b380e960908836b97aa034fa2753091e0172e/sys/sys/param.h#L207

Fixes curl#13847
@panjf2000 panjf2000 force-pushed the dragonfly-tcpkeepalive branch from ef9f6a4 to 30e7329 Compare June 1, 2024 11:10
@bagder
Copy link
Member

bagder commented Jun 1, 2024

2024-06-01T11:11:47.9578098Z ./cf-socket.c:145:85: warning: Longer than 79 columns (LONGLINE)

@panjf2000 panjf2000 force-pushed the dragonfly-tcpkeepalive branch from cf9057c to 07f982e Compare June 1, 2024 11:16
@panjf2000
Copy link
Contributor Author

2024-06-01T11:11:47.9578098Z ./cf-socket.c:145:85: warning: Longer than 79 columns (LONGLINE)

Fixed!

@bagder bagder closed this in 6da3203 Jun 1, 2024
@bagder
Copy link
Member

bagder commented Jun 1, 2024

Thanks!

@panjf2000 panjf2000 deleted the dragonfly-tcpkeepalive branch June 2, 2024 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Wrong time units of TCP keepalive options on DragonFlyBSD 5.8+

2 participants