Skip to content
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

请教个关于tcp ack 的问题 #37

Open
MemeTao opened this issue Feb 12, 2020 · 1 comment
Open

请教个关于tcp ack 的问题 #37

MemeTao opened this issue Feb 12, 2020 · 1 comment

Comments

@MemeTao
Copy link

MemeTao commented Feb 12, 2020

三次握手:

clien to server: syn,seq =0 -------------- server to client: syn ack 1, seq = 0
client to server: seq = 1, ack =1
接着(pcap send):
cllient to server: seq = 1, len = 29 ----------server to client: seq = 1, ack = 30

dummy tcp socket在收到服务端的 ack 30后,协议栈难道不会困惑么? 因为客户端tcp协议栈除了使用了三次握手中的seq 1后,2-29序号并不是协议栈发送的。它不应该发送RST 么?

我抓包看,协议栈并没有发出RST

@wangyu-
Copy link
Owner

wangyu- commented Feb 17, 2021

dummy tcp socket在收到服务端的 ack 30后,协议栈难道不会困惑么? 因为客户端tcp协议栈除了使用了三次握手中的seq 1后,2-29序号并不是协议栈发送的。它不应该发送RST 么?

会困惑,但是不发RST。 我当时试过至少windows和linux,协议栈对这种情况的处理是忽略。 发RST的典型情况是,TCP包发到了没有open的端口/没有建立连接的端口。

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

No branches or pull requests

2 participants