Skip to content

Commit 208dd45

Browse files
Benjmmikuba-moo
authored andcommitted
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 <[email protected]> Signed-off-by: Benjamin Yim <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 0959a82 commit 208dd45

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

net/ipv4/tcp_input.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3601,7 +3601,7 @@ bool tcp_oow_rate_limited(struct net *net, const struct sk_buff *skb,
36013601
}
36023602

36033603
/* RFC 5961 7 [ACK Throttling] */
3604-
static void tcp_send_challenge_ack(struct sock *sk, const struct sk_buff *skb)
3604+
static void tcp_send_challenge_ack(struct sock *sk)
36053605
{
36063606
/* unprotected vars, we dont care of overwrites */
36073607
static u32 challenge_timestamp;
@@ -3763,7 +3763,7 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
37633763
/* RFC 5961 5.2 [Blind Data Injection Attack].[Mitigation] */
37643764
if (before(ack, prior_snd_una - tp->max_window)) {
37653765
if (!(flag & FLAG_NO_CHALLENGE_ACK))
3766-
tcp_send_challenge_ack(sk, skb);
3766+
tcp_send_challenge_ack(sk);
37673767
return -1;
37683768
}
37693769
goto old_ack;
@@ -5726,7 +5726,7 @@ static bool tcp_validate_incoming(struct sock *sk, struct sk_buff *skb,
57265726
if (tp->syn_fastopen && !tp->data_segs_in &&
57275727
sk->sk_state == TCP_ESTABLISHED)
57285728
tcp_fastopen_active_disable(sk);
5729-
tcp_send_challenge_ack(sk, skb);
5729+
tcp_send_challenge_ack(sk);
57305730
}
57315731
goto discard;
57325732
}
@@ -5741,7 +5741,7 @@ static bool tcp_validate_incoming(struct sock *sk, struct sk_buff *skb,
57415741
if (syn_inerr)
57425742
TCP_INC_STATS(sock_net(sk), TCP_MIB_INERRS);
57435743
NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPSYNCHALLENGE);
5744-
tcp_send_challenge_ack(sk, skb);
5744+
tcp_send_challenge_ack(sk);
57455745
goto discard;
57465746
}
57475747

@@ -6456,7 +6456,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb)
64566456
if (!acceptable) {
64576457
if (sk->sk_state == TCP_SYN_RECV)
64586458
return 1; /* send one RST */
6459-
tcp_send_challenge_ack(sk, skb);
6459+
tcp_send_challenge_ack(sk);
64606460
goto discard;
64616461
}
64626462
switch (sk->sk_state) {

0 commit comments

Comments
 (0)