Skip to content

Commit

Permalink
[UDP6]: Restore sk_filter optimisation
Browse files Browse the repository at this point in the history
This reverts the changeset

    [IPV6]: UDPv6 checksum.

    We always need to check UDPv6 checksum because it is mandatory.

The sk_filter optimisation has nothing to do whether we verify the
checksum.  It simply postpones it to the point when the user calls
recv or poll.

Signed-off-by: Herbert Xu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
herbertx authored and David S. Miller committed Apr 26, 2007
1 parent 243bbca commit 1ab6eb6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions net/ipv6/udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,10 @@ int udpv6_queue_rcv_skb(struct sock * sk, struct sk_buff *skb)
}
}

if (udp_lib_checksum_complete(skb))
goto drop;
if (sk->sk_filter) {
if (udp_lib_checksum_complete(skb))
goto drop;
}

if ((rc = sock_queue_rcv_skb(sk,skb)) < 0) {
/* Note that an ENOMEM error is charged twice */
Expand Down

0 comments on commit 1ab6eb6

Please sign in to comment.