Eric Dumazet
c867a11289
tcp: properly scale window in tcp_v[46]_reqsk_send_ack()
...
[ Upstream commit 20a2b49fc538540819a0c552877086548cff8d8d ]
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 <ycheng@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Acked-by: Yuchung Cheng <ycheng@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tested-by: Holger Hoffstätte <holger@applied-asynchrony.com>
2016-09-30 10:18:34 +02:00
..
2015-10-21 00:49:25 +02:00
2015-10-28 12:32:48 -04:00
2015-11-17 14:38:35 -05:00
2015-09-17 22:13:32 -07:00
2016-07-11 09:31:12 -07:00
2016-05-11 11:21:18 +02:00
2016-08-20 18:09:19 +02:00
2016-07-11 09:31:11 -07:00
2015-12-01 15:45:05 -05:00
2015-10-13 17:42:34 +02:00
2016-08-10 11:49:29 +02:00
2016-07-27 09:47:31 -07:00
2015-10-09 07:52:27 -07:00
2016-04-20 15:42:04 +09:00
2016-05-18 17:06:35 -07:00
2015-11-18 16:27:46 -05:00
2015-11-01 15:56:11 -05:00
2015-09-28 22:51:15 -07:00
2015-11-23 14:56:15 -05:00
2015-11-02 22:47:14 -05:00
2016-09-30 10:18:34 +02:00
2016-09-30 10:18:34 +02:00
2016-08-16 09:30:48 +02:00
2016-03-03 15:07:03 -08:00
2015-10-23 03:05:19 -07:00
2016-06-24 10:18:17 -07:00
2015-10-07 04:27:43 -07:00
2016-05-18 17:06:40 -07:00
2016-09-07 08:32:41 +02:00
2015-10-21 00:49:24 +02:00
2016-04-20 15:42:07 +09:00
2016-09-15 08:27:50 +02:00
2016-08-20 18:09:22 +02:00
2016-06-24 10:18:16 -07:00
2015-12-01 15:45:05 -05:00
2016-06-24 10:18:18 -07:00
2016-07-27 09:47:31 -07:00
2016-01-31 11:29:00 -08:00
2016-09-15 08:27:51 +02:00
2016-03-03 15:07:26 -08:00
2015-06-24 02:58:51 -07:00
2015-12-01 15:45:05 -05:00
2016-07-27 09:47:31 -07:00
2016-04-20 15:41:58 +09:00
2016-09-07 08:32:36 +02:00
2016-06-24 10:18:16 -07:00
2016-09-24 10:07:35 +02:00
2016-07-27 09:47:33 -07:00
2016-05-18 17:06:41 -07:00
2015-08-09 22:43:52 -07:00
2016-09-24 10:07:41 +02:00
2016-05-18 17:06:43 -07:00
2016-04-20 15:42:05 +09:00
2015-09-29 20:40:32 -07:00
2015-09-29 20:40:32 -07:00
2016-04-20 15:42:03 +09:00
2016-09-15 08:27:50 +02:00