-
Notifications
You must be signed in to change notification settings - Fork 1.1k
macos: add TCP_FASTOPEN_FORCE_ENABLE #3135
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
macos: add TCP_FASTOPEN_FORCE_ENABLE #3135
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @JohnTitor (or someone else) soon. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
This is used to disable the backoff mechanism, otherwise TFO is basically unusable. Updates rust-lang#1632 and rust-lang#1635 Definition: https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/netinet/tcp.h#L310 Related commits/PRs: zonyitoo/tokio-tfo#5, database64128/tfo-go@c980f6b
c5da558
to
08b2969
Compare
Did I miss anything? Not sure why the test failed. |
The source you linked seems old, there's no update since 2021. For example, https://github.com/apple-oss-distributions/xnu/blob/5c2921b07a2480ab43ec66f5b9e41cb872bc554f/bsd/netinet/tcp_private.h#L141 shows it's now a private type. But it may be inaccurate as I cannot make sure it's official. Could you check the source directly? I don't have macOS env. |
I also don't have macOS env. This only came up because I was helping test an iOS app that uses my tfo-go module and it does not reliably utilize TFO. I was able to make TFO consistently work on my iOS 15 & 16 devices by setting @zonyitoo Can you help with this? @JohnTitor If it's indeed a private type, does that mean it's no longer eligible for inclusion in this project? |
I could verify that setsockopt(0x6, 0x6, 0x218) = 0 0 Client will always try to send TFO cookie even if the remote endpoint doesn't support TFO ( |
@zonyitoo Thanks for the pcap file. Can you check the header file on your system to see if it's indeed part of the private API? I think that's also what they meant in their comment:
|
Source Path:
#define MPTCP_ALTERNATE_PORT 0x216
#define MPTCP_FORCE_ENABLE 0x217
#define TCP_FASTOPEN_FORCE_ENABLE 0x218
#define MPTCP_EXPECTED_PROGRESS_TARGET 0x219
#define MPTCP_FORCE_VERSION 0x21a Well, yes, it is part of the private API. Because it doesn't included in:
So it is impossible to use it directly from C without adding the |
There's no solid policy about the private items, but if it's subject to change in the future or needs additional setup, this crate's stability policy doesn't work well, I think. |
This is used to disable the backoff mechanism, otherwise TFO is basically unusable.
Updates #1632 and #1635
Definition
https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/netinet/tcp.h#L310
Related Commits/PRs