Commit 90cd5467 authored by Jakub Kicinski's avatar Jakub Kicinski

Merge branch 'tcp-disable-header-prediction-for-md5'

Kuniyuki Iwashima says:

====================
tcp: Disable header prediction for MD5.

The 1st patch disable header prediction for MD5 flow and the 2nd
patch updates the stale comment in tcp_parse_options().
====================

Link: https://lore.kernel.org/r/20230803224552.69398-1-kuniyu@amazon.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents f4bf4678 b2051536
...@@ -4126,9 +4126,8 @@ void tcp_parse_options(const struct net *net, ...@@ -4126,9 +4126,8 @@ void tcp_parse_options(const struct net *net,
break; break;
#ifdef CONFIG_TCP_MD5SIG #ifdef CONFIG_TCP_MD5SIG
case TCPOPT_MD5SIG: case TCPOPT_MD5SIG:
/* /* The MD5 Hash has already been
* The MD5 Hash has already been * checked (see tcp_v{4,6}_rcv()).
* checked (see tcp_v{4,6}_do_rcv()).
*/ */
break; break;
#endif #endif
......
...@@ -570,8 +570,6 @@ struct sock *tcp_create_openreq_child(const struct sock *sk, ...@@ -570,8 +570,6 @@ struct sock *tcp_create_openreq_child(const struct sock *sk,
newtp->tsoffset = treq->ts_off; newtp->tsoffset = treq->ts_off;
#ifdef CONFIG_TCP_MD5SIG #ifdef CONFIG_TCP_MD5SIG
newtp->md5sig_info = NULL; /*XXX*/ newtp->md5sig_info = NULL; /*XXX*/
if (treq->af_specific->req_md5_lookup(sk, req_to_sk(req)))
newtp->tcp_header_len += TCPOLEN_MD5SIG_ALIGNED;
#endif #endif
if (skb->len >= TCP_MSS_DEFAULT + newtp->tcp_header_len) if (skb->len >= TCP_MSS_DEFAULT + newtp->tcp_header_len)
newicsk->icsk_ack.last_seg_size = skb->len - newtp->tcp_header_len; newicsk->icsk_ack.last_seg_size = skb->len - newtp->tcp_header_len;
......
...@@ -3741,11 +3741,6 @@ static void tcp_connect_init(struct sock *sk) ...@@ -3741,11 +3741,6 @@ static void tcp_connect_init(struct sock *sk)
if (READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_timestamps)) if (READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_timestamps))
tp->tcp_header_len += TCPOLEN_TSTAMP_ALIGNED; tp->tcp_header_len += TCPOLEN_TSTAMP_ALIGNED;
#ifdef CONFIG_TCP_MD5SIG
if (tp->af_specific->md5_lookup(sk, sk))
tp->tcp_header_len += TCPOLEN_MD5SIG_ALIGNED;
#endif
/* If user gave his TCP_MAXSEG, record it to clamp */ /* If user gave his TCP_MAXSEG, record it to clamp */
if (tp->rx_opt.user_mss) if (tp->rx_opt.user_mss)
tp->rx_opt.mss_clamp = tp->rx_opt.user_mss; tp->rx_opt.mss_clamp = tp->rx_opt.user_mss;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment