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

Duplicated packets cause read error? #556

Closed
zouyonghao opened this issue Oct 28, 2020 · 2 comments
Closed

Duplicated packets cause read error? #556

zouyonghao opened this issue Oct 28, 2020 · 2 comments

Comments

@zouyonghao
Copy link

I tested f-stack with the following packetdrill script

// DO NOT delete or add line in this file

// Establish a connection.
0   socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+0  setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
+0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
+0  bind(3, ..., ...) = 0
+0  listen(3, 1) = 0

+0  < S 0:0(0) win 32792 <mss 1000,sackOK,TS val 0 ecr 0,nop,wscale 7>
+.5  > S. 0:0(0) ack 1 <...>

+.1 < . 1:1(0) ack 1 win 32792 // do not send TS when testing f-stack by default
+0.1 accept(3, ..., ...) = 4

+0 < . 1:2001(2000) ack 1 win 25726
+0 < . 1:4091(4090) ack 1 win 25198
+0.1 read(4, ..., 20290) =  4090

The read results contains some error, but same script is executed correct in FreeBSD.

I'm not sure whether my packetdrill implementation for f-stack is correct, does f-stack team ever test f-stack with packetdrill?

And maybe you could reproduce the same situation with other tools.

@jfb8856606
Copy link
Contributor

Which version of FreeBSD you tested?

F-Stack use FreeBSD release 11.0, and will try to minimize or not change the behavior of the TCP/IP protocol stack, there may be some different in different versions.

@zouyonghao
Copy link
Author

I test it on FreeBSD 12.1, but the read data contains error when I test my script with f-stack, and I think it may also do not happen on FreeBSD 11.0.
It may be a bug in f-stack, could you test this case?

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