From: Herbert Xu Date: Wed, 7 Mar 2007 04:29:58 +0000 (-0800) Subject: [UDP6]: Restore sk_filter optimisation X-Git-Tag: v2.6.22-rc1~1128^2~396 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=1ab6eb62b02e0949a392fb19bf31ba59ae1022b1;p=linux-2.6-omap-h63xx.git [UDP6]: Restore sk_filter optimisation 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 Signed-off-by: David S. Miller --- diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index f590db57a7c..3413fc22ce4 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -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 */