aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
authorHans Wippel <hwippel@linux.vnet.ibm.com>2018-03-23 06:05:45 -0400
committerDavid S. Miller <davem@davemloft.net>2018-03-25 20:53:54 -0400
commitbc58a1baf2a97838a422ce4e75180c4b680e7a9b (patch)
tree28d3be12af108d383d1ef92fa75c60dfe74d54b0 /net/ipv4/tcp_input.c
parentb9ee96b45fddc2e507102f32ead30311814c1fc0 (diff)
net/ipv4: disable SMC TCP option with SYN Cookies
Currently, the SMC experimental TCP option in a SYN packet is lost on the server side when SYN Cookies are active. However, the corresponding SYNACK sent back to the client contains the SMC option. This causes an inconsistent view of the SMC capabilities on the client and server. This patch disables the SMC option in the SYNACK when SYN Cookies are active to avoid this issue. Fixes: 60e2a7780793b ("tcp: TCP experimental option for SMC") Signed-off-by: Hans Wippel <hwippel@linux.vnet.ibm.com> Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r--net/ipv4/tcp_input.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 9a1b3c1c1c14..ff6cd98ce8d5 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -6256,6 +6256,9 @@ int tcp_conn_request(struct request_sock_ops *rsk_ops,
6256 if (want_cookie && !tmp_opt.saw_tstamp) 6256 if (want_cookie && !tmp_opt.saw_tstamp)
6257 tcp_clear_options(&tmp_opt); 6257 tcp_clear_options(&tmp_opt);
6258 6258
6259 if (IS_ENABLED(CONFIG_SMC) && want_cookie)
6260 tmp_opt.smc_ok = 0;
6261
6259 tmp_opt.tstamp_ok = tmp_opt.saw_tstamp; 6262 tmp_opt.tstamp_ok = tmp_opt.saw_tstamp;
6260 tcp_openreq_init(req, &tmp_opt, skb, sk); 6263 tcp_openreq_init(req, &tmp_opt, skb, sk);
6261 inet_rsk(req)->no_srccheck = inet_sk(sk)->transparent; 6264 inet_rsk(req)->no_srccheck = inet_sk(sk)->transparent;