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