Skip to content

Commit

Permalink
bpf: Remove duplicate tcp_filter hook in ipv6
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Chenbo Feng authored and andy-padavan committed Oct 9, 2017
1 parent db60c1f commit 407a6ea
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions trunk/linux-3.4.x/net/ipv6/tcp_ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -1443,9 +1443,6 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
goto discard;
#endif

if (tcp_filter(sk, skb))
goto discard;

/*
* socket locking is here for SMP purposes as backlog rcv
* is currently called with bh processing disabled.
Expand Down

0 comments on commit 407a6ea

Please sign in to comment.