diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2010-04-08 08:52:28 -0400 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-04-08 08:52:28 -0400 |
commit | 9e56c21486f2a64473f36fa49475fd253422fbf6 (patch) | |
tree | 08e2a613a0e473e491f327422417f47dd67f9a9a | |
parent | 3d91c1a848c812e0e66e7e57f076667822cb460e (diff) |
netfilter: only do skb_checksum_help on CHECKSUM_PARTIAL in ip_queue
While doing yet another audit on ip_summed I noticed ip_queue
calling skb_checksum_help unnecessarily. As we will set ip_summed
to CHECKSUM_NONE when necessary in ipq_mangle_ipv4, there is no
need to zap CHECKSUM_COMPLETE in ipq_build_packet_message.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Patrick McHardy <kaber@trash.net>
-rw-r--r-- | net/ipv4/netfilter/ip_queue.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c index 2855f1f38cbc..d781513282d4 100644 --- a/net/ipv4/netfilter/ip_queue.c +++ b/net/ipv4/netfilter/ip_queue.c | |||
@@ -160,8 +160,7 @@ ipq_build_packet_message(struct nf_queue_entry *entry, int *errp) | |||
160 | break; | 160 | break; |
161 | 161 | ||
162 | case IPQ_COPY_PACKET: | 162 | case IPQ_COPY_PACKET: |
163 | if ((entry->skb->ip_summed == CHECKSUM_PARTIAL || | 163 | if (entry->skb->ip_summed == CHECKSUM_PARTIAL && |
164 | entry->skb->ip_summed == CHECKSUM_COMPLETE) && | ||
165 | (*errp = skb_checksum_help(entry->skb))) { | 164 | (*errp = skb_checksum_help(entry->skb))) { |
166 | read_unlock_bh(&queue_lock); | 165 | read_unlock_bh(&queue_lock); |
167 | return NULL; | 166 | return NULL; |