netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [UDP6]: Restore sk_filter optimisation
@ 2007-03-06  1:20 Herbert Xu
  2007-03-07  4:30 ` David Miller
  2007-10-29  6:33 ` Mitsuru Chinen
  0 siblings, 2 replies; 8+ messages in thread
From: Herbert Xu @ 2007-03-06  1:20 UTC (permalink / raw)
  To: David S. Miller, netdev; +Cc: YOSHIFUJI Hideaki

Hi Dave:

[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 <herbert@gondor.apana.org.au>

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 0ad4719..4474480 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 */

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-11-01 13:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-06  1:20 [UDP6]: Restore sk_filter optimisation Herbert Xu
2007-03-07  4:30 ` David Miller
2007-10-29  6:33 ` Mitsuru Chinen
2007-10-29  6:41   ` YOSHIFUJI Hideaki / 吉藤英明
2007-10-29 12:53   ` Herbert Xu
2007-10-31 14:05     ` Mitsuru Chinen
2007-10-31 14:42       ` Herbert Xu
2007-11-01 13:34         ` Mitsuru Chinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).