Skip to content

Commit 384abed

Browse files
Chenbo Fengdavem330
authored andcommitted
bpf: Remove duplicate tcp_filter hook in ipv6
There are two tcp_filter hooks in tcp_ipv6 ingress path currently. One is at tcp_v6_rcv and another is in tcp_v6_do_rcv. It seems the tcp_filter() call inside tcp_v6_do_rcv is redundent and some packet will be filtered twice in this situation. This will cause trouble when using eBPF filters to account traffic data. Signed-off-by: Chenbo Feng <fengc@google.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent cd99c37 commit 384abed

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

net/ipv6/tcp_ipv6.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,9 +1249,6 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
12491249
if (skb->protocol == htons(ETH_P_IP))
12501250
return tcp_v4_do_rcv(sk, skb);
12511251

1252-
if (tcp_filter(sk, skb))
1253-
goto discard;
1254-
12551252
/*
12561253
* socket locking is here for SMP purposes as backlog rcv
12571254
* is currently called with bh processing disabled.

0 commit comments

Comments
 (0)