Netdev List
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Patrick McHardy <kaber@trash.net>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org
Subject: netfilter: Only do skb_checksum_help on CHECKSUM_PARTIAL in nfnetlink_queue
Date: Thu, 8 Apr 2010 20:41:58 +0800	[thread overview]
Message-ID: <20100408124158.GB23910@gondor.apana.org.au> (raw)
In-Reply-To: <20100408123930.GA23910@gondor.apana.org.au>

netfilter: Only do skb_checksum_help on CHECKSUM_PARTIAL in nfnetlink_queue

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

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

diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c
index e70a6ef..12e1ab3 100644
--- a/net/netfilter/nfnetlink_queue.c
+++ b/net/netfilter/nfnetlink_queue.c
@@ -246,8 +246,7 @@ nfqnl_build_packet_message(struct nfqnl_instance *queue,
 		break;
 
 	case NFQNL_COPY_PACKET:
-		if ((entskb->ip_summed == CHECKSUM_PARTIAL ||
-		     entskb->ip_summed == CHECKSUM_COMPLETE) &&
+		if (entskb->ip_summed == CHECKSUM_PARTIAL &&
 		    skb_checksum_help(entskb)) {
 			spin_unlock_bh(&queue->lock);
 			return NULL;

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

  reply	other threads:[~2010-04-08 12:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-08 12:35 netfilter: Only do skb_checksum_help on CHECKSUM_PARTIAL in ip_queue Herbert Xu
2010-04-08 12:39 ` netfilter: Only do skb_checksum_help on CHECKSUM_PARTIAL in ip6_queue Herbert Xu
2010-04-08 12:41   ` Herbert Xu [this message]
2010-04-08 12:55     ` netfilter: Only do skb_checksum_help on CHECKSUM_PARTIAL in nfnetlink_queue Patrick McHardy
2010-04-08 12:54   ` netfilter: Only do skb_checksum_help on CHECKSUM_PARTIAL in ip6_queue Patrick McHardy
2010-04-08 12:53 ` netfilter: Only do skb_checksum_help on CHECKSUM_PARTIAL in ip_queue Patrick McHardy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100408124158.GB23910@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=davem@davemloft.net \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox