From: Herbert Xu Date: Thu, 8 Apr 2010 12:54:35 +0000 (+0200) Subject: netfilter: only do skb_checksum_help on CHECKSUM_PARTIAL in nfnetlink_queue X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e9f13cab49f7f28b65a6f63201fca56480b2e059;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Patrick McHardy --- diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c index 7ba4abc405c9..08c1a33077a0 100644 --- a/net/netfilter/nfnetlink_queue.c +++ b/net/netfilter/nfnetlink_queue.c @@ -245,8 +245,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;