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

Packetdrill does multiple calls to the random number generator #29

Open
cpaasch opened this issue Jul 28, 2014 · 0 comments
Open

Packetdrill does multiple calls to the random number generator #29

cpaasch opened this issue Jul 28, 2014 · 0 comments

Comments

@cpaasch
Copy link
Contributor

cpaasch commented Jul 28, 2014

I experience that packetdrill does multiple calls to the random number generator to generate keys or nonces (for the MP_JOIN).

It looks to me that it always calls new_subflow_inbound, even if we are retransmitting SYN+MP_JOIN's, like:

0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+0  setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
+0  bind(3, {sa_family = AF_INET, sin_port = htons(13000), sin_addr = inet_addr("192.168.0.1")}, ...) = 0
+0  listen(3, 1) = 0

+0  socket(..., SOCK_STREAM, IPPROTO_TCP) = 5
+0  setsockopt(5, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
+0  bind(5, {sa_family = AF_INET, sin_port = htons(13001), sin_addr = inet_addr("192.168.0.1")}, ...) = 0
+0  listen(5,1) = 0

+0  < S 0:0(0) win 32792 <mss 1460,sackOK,nop,nop,nop,wscale 7,mp_capable key_a> sock(3)
+0  > S. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK,nop,wscale 7,mp_capable key_b> sock(3)
+0  < . 1:1(0) ack 1 win 257 <mp_capable key_a key_b> sock(3)
+0  accept(3, ..., ...) = 4

//First subflow
+0  < S 0:0(0) win 32792 <mss 1460,sackOK,nop,nop,nop,wscale 7,mp_join_syn address_id=0 token=sha1_32(key_b)> sock(5)
+0  > S. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK,nop,wscale 7, mp_join_syn_ack backup=0 address_id=0 sender_hmac=trunc_l64_hmac(key_b key_a) > sock(5)
+0.1  < S 0:0(0) win 32792 <mss 1460,sackOK,nop,nop,nop,wscale 7,mp_join_syn address_id=0 token=sha1_32(key_b)> sock(5)
+0  > S. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK,nop,wscale 7, mp_join_syn_ack backup=0 address_id=0 sender_hmac=trunc_l64_hmac(key_b key_a) > sock(5)
+0  < . 1:1(0) ack 1 win 32792 <mp_join_ack sender_hmac=full_160_hmac(key_a key_b)> sock(5)
+0 mp_join_accept(5) = 6

+0 > . 1:1(0) ack 1 <...> sock(6) // reliably mp_join_ack

I think it is ok that packetdrill uses static values for the random nonce or keys. If somebody wants to use different values he can still set them manually in the packetdrill-script.

matttbe added a commit to multipath-tcp/packetdrill_mptcp that referenced this issue Mar 1, 2022
mptcp: add regression test for 0-len recvmsg()
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

1 participant