Patchwork netfilter: Only do skb_checksum_help on CHECKSUM_PARTIAL in ip6_queue

login
register
mail settings
Submitter Herbert Xu
Date April 8, 2010, 12:39 p.m.
Message ID <20100408123930.GA23910@gondor.apana.org.au>
Download mbox | patch
Permalink /patch/49729/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Herbert Xu - April 8, 2010, 12:39 p.m.
On Thu, Apr 08, 2010 at 08:35:45PM +0800, Herbert Xu wrote:
> 
> netfilter: Only do skb_checksum_help on CHECKSUM_PARTIAL in ip_queue

Doh! There are three of these queue beasts.

netfilter: Only do skb_checksum_help on CHECKSUM_PARTIAL in ip6_queue

As we will set ip_summed to CHECKSUM_NONE when necessary in
ipq_mangle_ipv6, there is no need to zap CHECKSUM_COMPLETE in
ipq_build_packet_message.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>


Cheers,
Patrick McHardy - April 8, 2010, 12:54 p.m.
Herbert Xu wrote:
> On Thu, Apr 08, 2010 at 08:35:45PM +0800, Herbert Xu wrote:
>> netfilter: Only do skb_checksum_help on CHECKSUM_PARTIAL in ip_queue
> 
> Doh! There are three of these queue beasts.

;)

> netfilter: Only do skb_checksum_help on CHECKSUM_PARTIAL in ip6_queue
> 
> As we will set ip_summed to CHECKSUM_NONE when necessary in
> ipq_mangle_ipv6, there is no need to zap CHECKSUM_COMPLETE in
> ipq_build_packet_message.

Also applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c
index 6a68a74..8656eb7 100644
--- a/net/ipv6/netfilter/ip6_queue.c
+++ b/net/ipv6/netfilter/ip6_queue.c
@@ -162,8 +162,7 @@  ipq_build_packet_message(struct nf_queue_entry *entry, int *errp)
 		break;
 
 	case IPQ_COPY_PACKET:
-		if ((entry->skb->ip_summed == CHECKSUM_PARTIAL ||
-		     entry->skb->ip_summed == CHECKSUM_COMPLETE) &&
+		if (entry->skb->ip_summed == CHECKSUM_PARTIAL &&
 		    (*errp = skb_checksum_help(entry->skb))) {
 			read_unlock_bh(&queue_lock);
 			return NULL;