Linux 什么';TCP\u NEW\u SYN\u RECV的含义是什么?

Linux 什么';TCP\u NEW\u SYN\u RECV的含义是什么?,linux,networking,tcp,linux-kernel,kernel,Linux,Networking,Tcp,Linux Kernel,Kernel,我知道TCP_SYN_RECV,但是TCP_NEW_SYN_RECV的含义是什么?他们之间有什么区别 我还看到了下面的代码“sk->sk_state==TCP_NEW_SYN_RECV”,为什么不改为使用“sk->sk_state==TCP_SYN_RECV” 我发现: TCP_SYN_RECV state is currently used by fast open sockets. Initial TCP requests (the pseudo sockets created whe

我知道TCP_SYN_RECV,但是TCP_NEW_SYN_RECV的含义是什么?他们之间有什么区别

我还看到了下面的代码“sk->sk_state==TCP_NEW_SYN_RECV”,为什么不改为使用“sk->sk_state==TCP_SYN_RECV”

我发现:

TCP_SYN_RECV state is currently used by fast open sockets.

Initial TCP requests (the pseudo sockets created when a SYN is received)
are not yet associated to a state. They are attached to their parent,
and the parent is in TCP_LISTEN state.

This commit adds TCP_NEW_SYN_RECV state, so that we can convert
TCP stack to a different schem gradually.

source,作者提交:

您可以从相应的提交中找到它。在内核源代码目录中使用git log-S'TCP_NEW_SYN_RECV'--path/to/file/of/interest,找出向上述文件添加了
TCP_NEW_SYN_RECV
的提交。阅读发现的提交消息,了解新定义及其用法。另外,我建议您使用mainline repo from(),而不是github。答案很好,我知道了,非常感谢。
if (sk->sk_state == TCP_NEW_SYN_RECV) {
    struct request_sock *req = inet_reqsk(sk);
    struct sock *nsk;
TCP_SYN_RECV state is currently used by fast open sockets.

Initial TCP requests (the pseudo sockets created when a SYN is received)
are not yet associated to a state. They are attached to their parent,
and the parent is in TCP_LISTEN state.

This commit adds TCP_NEW_SYN_RECV state, so that we can convert
TCP stack to a different schem gradually.