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-07-31 15:21:30 -07:00
2016-09-24 10:07:42 +02:00
2015-12-22 15:57:54 -05:00
2015-12-14 16:09:30 -05:00
2015-08-25 13:37:31 -07:00
2015-03-31 13:51:54 -04:00
2016-03-03 15:07:05 -08:00
2015-05-28 11:23:20 +08:00
2016-04-20 15:41:59 +09:00
2015-09-02 15:31:00 -07:00
2015-12-02 23:37:16 -05:00
2015-10-23 02:38:18 -07:00
2015-12-03 11:32:06 -05:00
2015-10-08 04:27:03 -07:00
2015-12-03 11:32:06 -05:00
2015-10-12 19:28:20 -07:00
2014-06-04 22:46:38 -07:00
2016-07-27 09:47:31 -07:00
2016-03-03 15:07:05 -08:00
2016-04-20 15:41:56 +09:00
2014-08-24 22:37:52 -07:00
2015-09-17 17:18:37 -07:00
2015-10-21 19:36:11 -07:00
2016-06-24 10:18:17 -07:00
2016-04-20 15:42:06 +09:00
2015-08-29 13:07:54 -07:00
2015-10-08 04:26:54 -07:00
2016-07-11 09:31:11 -07:00
2014-08-24 22:37:52 -07:00
2015-12-02 23:37:16 -05:00
2015-08-17 21:33:06 -07:00
2015-08-17 21:33:06 -07:00
2015-08-13 17:08:39 -07:00
2016-04-20 15:41:58 +09:00
2015-10-05 03:16:47 -07:00
2015-12-23 22:03:54 -05:00
2015-09-29 20:21:32 +02:00
2015-10-08 04:27:02 -07:00
2016-09-30 10:18:34 +02:00
2014-11-07 15:45:50 -05:00
2014-09-19 17:15:31 -04:00
2015-12-02 23:37:16 -05:00
2016-05-18 17:06:36 -07:00
2016-05-18 17:06:43 -07:00
2016-07-11 09:31:11 -07:00
2015-12-02 23:37:16 -05:00
2015-07-31 17:07:11 -07:00
2016-09-30 10:18:34 +02:00
2015-02-28 16:56:51 -05:00
2015-11-03 10:52:13 -05:00
2015-03-02 13:06:31 -05:00
2015-03-25 14:07:04 -04: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
2015-03-31 13:58:35 -04:00
2013-12-06 12:37:56 -05:00
2016-01-31 11:29:01 -08:00
2015-10-24 06:54:12 -07:00
2015-12-22 16:26:31 -05:00
2014-05-06 07:08:38 +02:00
2014-08-24 22:37:52 -07:00
2014-08-24 22:37:52 -07:00