diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-03-06 23:29:58 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:23:50 -0400 |
commit | 1ab6eb62b02e0949a392fb19bf31ba59ae1022b1 (patch) | |
tree | 1f4449baccd0de7fa900c39d04c78deebb79242b /net/ipv6/udp.c | |
parent | 243bbcaa09e8482aa28065cbc2eb99f0ca2fc8d6 (diff) |
[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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/udp.c')
-rw-r--r-- | net/ipv6/udp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index f590db57a7c9..3413fc22ce4a 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) | |||
279 | } | 279 | } |
280 | } | 280 | } |
281 | 281 | ||
282 | if (udp_lib_checksum_complete(skb)) | 282 | if (sk->sk_filter) { |
283 | goto drop; | 283 | if (udp_lib_checksum_complete(skb)) |
284 | goto drop; | ||
285 | } | ||
284 | 286 | ||
285 | if ((rc = sock_queue_rcv_skb(sk,skb)) < 0) { | 287 | if ((rc = sock_queue_rcv_skb(sk,skb)) < 0) { |
286 | /* Note that an ENOMEM error is charged twice */ | 288 | /* Note that an ENOMEM error is charged twice */ |