tcp: tcp_send_challenge_ack delete useless param skb
After this parameter is passed in, there is no usage, and deleting it will not bring any impact. Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Benjamin Yim <yan2228598786@gmail.com> Link: https://lore.kernel.org/r/20220109130824.2776-1-yan2228598786@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
0959a82ab3
commit
208dd45d8d
@ -3601,7 +3601,7 @@ bool tcp_oow_rate_limited(struct net *net, const struct sk_buff *skb,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* RFC 5961 7 [ACK Throttling] */
|
/* RFC 5961 7 [ACK Throttling] */
|
||||||
static void tcp_send_challenge_ack(struct sock *sk, const struct sk_buff *skb)
|
static void tcp_send_challenge_ack(struct sock *sk)
|
||||||
{
|
{
|
||||||
/* unprotected vars, we dont care of overwrites */
|
/* unprotected vars, we dont care of overwrites */
|
||||||
static u32 challenge_timestamp;
|
static u32 challenge_timestamp;
|
||||||
@ -3763,7 +3763,7 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
|
|||||||
/* RFC 5961 5.2 [Blind Data Injection Attack].[Mitigation] */
|
/* RFC 5961 5.2 [Blind Data Injection Attack].[Mitigation] */
|
||||||
if (before(ack, prior_snd_una - tp->max_window)) {
|
if (before(ack, prior_snd_una - tp->max_window)) {
|
||||||
if (!(flag & FLAG_NO_CHALLENGE_ACK))
|
if (!(flag & FLAG_NO_CHALLENGE_ACK))
|
||||||
tcp_send_challenge_ack(sk, skb);
|
tcp_send_challenge_ack(sk);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
goto old_ack;
|
goto old_ack;
|
||||||
@ -5726,7 +5726,7 @@ static bool tcp_validate_incoming(struct sock *sk, struct sk_buff *skb,
|
|||||||
if (tp->syn_fastopen && !tp->data_segs_in &&
|
if (tp->syn_fastopen && !tp->data_segs_in &&
|
||||||
sk->sk_state == TCP_ESTABLISHED)
|
sk->sk_state == TCP_ESTABLISHED)
|
||||||
tcp_fastopen_active_disable(sk);
|
tcp_fastopen_active_disable(sk);
|
||||||
tcp_send_challenge_ack(sk, skb);
|
tcp_send_challenge_ack(sk);
|
||||||
}
|
}
|
||||||
goto discard;
|
goto discard;
|
||||||
}
|
}
|
||||||
@ -5741,7 +5741,7 @@ syn_challenge:
|
|||||||
if (syn_inerr)
|
if (syn_inerr)
|
||||||
TCP_INC_STATS(sock_net(sk), TCP_MIB_INERRS);
|
TCP_INC_STATS(sock_net(sk), TCP_MIB_INERRS);
|
||||||
NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPSYNCHALLENGE);
|
NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPSYNCHALLENGE);
|
||||||
tcp_send_challenge_ack(sk, skb);
|
tcp_send_challenge_ack(sk);
|
||||||
goto discard;
|
goto discard;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6456,7 +6456,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb)
|
|||||||
if (!acceptable) {
|
if (!acceptable) {
|
||||||
if (sk->sk_state == TCP_SYN_RECV)
|
if (sk->sk_state == TCP_SYN_RECV)
|
||||||
return 1; /* send one RST */
|
return 1; /* send one RST */
|
||||||
tcp_send_challenge_ack(sk, skb);
|
tcp_send_challenge_ack(sk);
|
||||||
goto discard;
|
goto discard;
|
||||||
}
|
}
|
||||||
switch (sk->sk_state) {
|
switch (sk->sk_state) {
|
||||||
|
Loading…
Reference in New Issue
Block a user