]> err.no Git - linux-2.6/commitdiff
[UDP6]: Restore sk_filter optimisation
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 7 Mar 2007 04:29:58 +0000 (20:29 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 26 Apr 2007 05:23:50 +0000 (22:23 -0700)
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 <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/udp.c

index f590db57a7c9a6038fb22979f2922833576b61b2..3413fc22ce4a9b92e149e01e55ab15a261f861da 100644 (file)
@@ -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 */