Skip to content

Commit d25f327

Browse files
JasonXingPaolo Abeni
authored andcommitted
tcp: no need to use acceptable for conn_request
Since tcp_conn_request() always returns zero, there is no need to keep the dead code. Remove it then. Link: https://lore.kernel.org/netdev/CANn89iJwx9b2dUGUKFSV3PF=kN5o+kxz3A_fHZZsOS4AnXhBNw@mail.gmail.com/ Suggested-by: Eric Dumazet <[email protected]> Signed-off-by: Jason Xing <[email protected]> Reviewed-by: Eric Dumazet <[email protected]> Reviewed-by: Kuniyuki Iwashima <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent 3be0d95 commit d25f327

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

net/ipv4/tcp_input.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6623,7 +6623,6 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb)
66236623
const struct tcphdr *th = tcp_hdr(skb);
66246624
struct request_sock *req;
66256625
int queued = 0;
6626-
bool acceptable;
66276626
SKB_DR(reason);
66286627

66296628
switch (sk->sk_state) {
@@ -6649,12 +6648,10 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb)
66496648
*/
66506649
rcu_read_lock();
66516650
local_bh_disable();
6652-
acceptable = icsk->icsk_af_ops->conn_request(sk, skb) >= 0;
6651+
icsk->icsk_af_ops->conn_request(sk, skb);
66536652
local_bh_enable();
66546653
rcu_read_unlock();
66556654

6656-
if (!acceptable)
6657-
return 1;
66586655
consume_skb(skb);
66596656
return 0;
66606657
}

0 commit comments

Comments
 (0)