netfilter: Only do skb_checksum_help on CHECKSUM_PARTIAL in nfnetlink_queue

Submitted by Herbert Xu on April 8, 2010, 12:41 p.m.

Details

Message ID 20100408124158.GB23910@gondor.apana.org.au
State Not Applicable
Delegated to: David Miller
Headers show

Commit Message

Herbert Xu April 8, 2010, 12:41 p.m.
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>


Cheers,

Comments

Patrick McHardy April 8, 2010, 12:55 p.m.
Herbert Xu wrote:
> 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.

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 hide | download patch | download mbox

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;