Thread (4 messages) flat view 4 messages, 4 authors, 2016-08-23

Re: [PATCH net] tcp: properly scale window in tcp_v[46]_reqsk_send_ack()

From: Neal Cardwell <ncardwell@google.com>
Date: 2016-08-22 18:59:42

On Mon, Aug 22, 2016 at 2:31 PM, Eric Dumazet [off-list ref] wrote:
From: Eric Dumazet <edumazet@google.com>

When sending an ack in SYN_RECV state, we must scale the offered
window if wscale option was negotiated and accepted.

Tested:
 Following packetdrill test demonstrates the issue :

0.000 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0

+0 bind(3, ..., ...) = 0
+0 listen(3, 1) = 0

// Establish a connection.
+0 < S 0:0(0) win 20000 <mss 1000,sackOK,wscale 7, nop, TS val 100 ecr 0>
+0 > S. 0:0(0) ack 1 win 28960 <mss 1460,sackOK, TS val 100 ecr 100, nop, wscale 7>

+0 < . 1:11(10) ack 1 win 156 <nop,nop,TS val 99 ecr 100>
// check that window is properly scaled !
+0 > . 1:1(0) ack 1 win 226 <nop,nop,TS val 200 ecr 100>


Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Yuchung Cheng <redacted>
Cc: Neal Cardwell <ncardwell@google.com>
---
Acked-by: Neal Cardwell <ncardwell@google.com>

Nice.

neal
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help