From: Patrick McHardy <kaber@trash.net>
To: "David S. Miller" <davem@davemloft.net>
Cc: Netfilter Development Mailinglist <netfilter-devel@lists.netfilter.org>
Subject: [NETFILTER 5/8]: Fix HW checksum handling in nfnetlink_queue
Date: Tue, 06 Sep 2005 19:55:42 +0200 [thread overview]
Message-ID: <431DD81E.4020505@trash.net> (raw)
[-- Attachment #1: 05.diff --]
[-- Type: text/x-patch, Size: 1307 bytes --]
[NETFILTER]: Fix HW checksum handling in nfnetlink_queue
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
commit 917240fdfb4a326d7488803be075e60e9fda6a3e
tree a069ad28c8f81b1792041f27985e7f3e9ad0877b
parent 92d69138354a34bf06d5429ffa485e3b43282b3f
author Patrick McHardy <kaber@trash.net> Sun, 04 Sep 2005 18:25:32 +0200
committer Patrick McHardy <kaber@trash.net> Sun, 04 Sep 2005 18:25:32 +0200
net/netfilter/nfnetlink_queue.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c
--- a/net/netfilter/nfnetlink_queue.c
+++ b/net/netfilter/nfnetlink_queue.c
@@ -382,6 +382,12 @@ nfqnl_build_packet_message(struct nfqnl_
break;
case NFQNL_COPY_PACKET:
+ if (entry->skb->ip_summed == CHECKSUM_HW &&
+ (*errp = skb_checksum_help(entry->skb,
+ entry->info->outdev == NULL))) {
+ spin_unlock_bh(&queue->lock);
+ return NULL;
+ }
if (queue->copy_range == 0
|| queue->copy_range > entry->skb->len)
data_len = entry->skb->len;
@@ -647,7 +653,7 @@ nfqnl_mangle(void *data, int data_len, s
if (!skb_make_writable(&e->skb, data_len))
return -ENOMEM;
memcpy(e->skb->data, data, data_len);
-
+ e->skb->ip_summed = CHECKSUM_NONE;
return 0;
}
reply other threads:[~2005-09-06 17:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=431DD81E.4020505@trash.net \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=netfilter-devel@lists.netfilter.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.