Eric Dumazet
c867a11289
tcp: properly scale window in tcp_v[46]_reqsk_send_ack()
[ Upstream commit 20a2b49fc5 ]
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
..
2016-06-24 10:18:24 -07:00
2015-12-14 16:09:30 -05:00
2015-08-25 13:38:50 -07:00
2015-10-20 06:08:27 -07:00
2015-04-03 12:11:15 -04:00
2015-07-29 22:44:04 -07:00
2016-04-20 15:42:03 +09:00
2016-07-11 09:31:11 -07:00
2016-05-18 17:06:36 -07:00
2015-07-24 22:46:11 -07:00
2015-09-09 14:19:50 -07:00
2016-08-16 09:30:47 +02:00
2016-09-30 10:18:34 +02:00
2015-12-16 19:03:02 -05:00
2015-08-10 14:03:54 -07:00
2015-10-26 22:01:18 -07:00
2015-10-14 06:01:07 -07:00
2016-04-20 15:41:58 +09:00
2016-03-03 15:07:07 -08:00
2015-10-03 04:32:41 -07:00
2015-11-02 22:47:14 -05:00
2015-10-23 05:42:21 -07:00
2013-12-29 16:34:25 -05:00
2015-09-21 16:32:29 -07:00
2015-08-28 13:32:36 -07:00
2015-10-08 04:26:54 -07:00
2016-03-03 15:07:04 -08:00
2016-06-24 10:18:18 -07:00
2015-10-12 19:44:16 -07:00
2015-04-03 12:11:15 -04:00
2016-04-20 15:41:57 +09:00
2016-03-03 15:07:06 -08:00
2015-10-08 04:27:02 -07:00
2016-06-24 10:18:18 -07:00
2015-10-08 04:26:54 -07:00
2015-04-03 12:11:15 -04:00
2015-10-18 19:23:52 -07:00
2015-12-18 16:07:59 -05:00
2016-07-11 09:31:11 -07:00
2015-08-27 15:42:48 -07:00
2015-10-21 07:00:48 -07:00
2015-09-29 20:21:32 +02:00
2016-03-03 15:07:06 -08:00
2015-07-21 22:36:33 -07:00
2014-09-19 17:15:31 -04:00
2016-03-03 15:07:06 -08:00
2016-05-18 17:06:35 -07:00
2015-10-23 05:42:21 -07:00
2015-11-04 21:29:06 -05:00
2015-07-09 14:22:52 -07:00
2015-07-09 14:22:52 -07:00
2015-09-25 13:00:38 -07:00
2015-09-17 22:35:07 -07:00
2015-10-23 02:46:52 -07:00
2015-11-15 18:36:38 -05:00
2015-10-23 05:42:21 -07:00
2015-07-09 14:22:52 -07:00
2015-07-09 14:22:52 -07:00
2015-07-09 14:22:52 -07:00
2015-07-09 14:22:52 -07:00
2016-08-16 09:30:47 +02:00
2016-09-30 10:18:34 +02:00
2014-05-03 19:23:07 -04:00
2015-02-12 18:54:10 -08:00
2016-04-20 15:41:56 +09:00
2016-04-20 15:42:00 +09:00
2015-06-11 16:33:10 -07:00
2016-08-16 09:30:48 +02:00
2014-09-01 18:12:45 -07:00
2015-10-21 07:00:53 -07:00
2015-07-09 14:22:52 -07:00
2015-11-20 10:51:12 -05:00
2015-07-09 14:22:52 -07:00
2015-04-29 17:10:38 -04:00
2015-07-09 14:22:52 -07:00
2015-05-05 19:50:09 -04:00
2016-09-30 10:18:34 +02:00
2016-03-03 15:07:05 -08:00
2012-03-11 23:42:51 -07:00
2015-06-15 19:49:22 -07:00
2015-03-02 13:06:31 -05:00
2015-04-03 12:11:15 -04:00
2016-04-20 15:41:56 +09:00
2016-09-15 08:27:49 +02:00
2014-05-23 16:28:53 -04:00
2015-09-17 17:18:37 -07:00
2013-12-26 13:43:21 -05:00
2007-10-10 16:55:54 -07:00
2015-03-25 14:07:04 -04:00
2015-10-24 06:54:12 -07:00
2015-12-22 16:26:31 -05:00
2014-06-30 07:49:47 +02:00
2013-12-18 16:58:20 -05:00
2013-05-31 17:19:05 -07:00