From: Patrick McHardy <kaber@trash.net>
To: Harald Welte <laforge@netfilter.org>
Cc: Netfilter Development Mailinglist
<netfilter-devel@lists.netfilter.org>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [NETFILTER 1/4]: Fix HW checksum handling in ip_queue/ip6_queue
Date: Fri, 26 Aug 2005 18:45:22 +0200 [thread overview]
Message-ID: <430F4722.80808@trash.net> (raw)
In-Reply-To: <20050826111137.GS4226@rama.de.gnumonks.org>
[-- Attachment #1: Type: text/plain, Size: 507 bytes --]
Harald Welte wrote:
> I think we're going to need the same fix for nfnetlink_queue, too. I'm
> not sure whether I could just copy+paste your code into the respective
> section of the code, or whether there are some other issues that need to
> be thought of, like "Is skb->ip_summed valid for non-ip-packets?".
>
> Please advise or propose a patch, thanks!
The same fix is fine for nfnetlink_queue, protocols that don't support
HW checksumming ip_summed is set to CHECKSUM_NONE and the fix does
nothing.
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1307 bytes --]
[NETFILTER]: Fix HW checksum handling in nfnetlink_queue
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
commit fd32f6a1bad85e74e72ac603bce19da767b5928f
tree c69f2224f141fbb6085f9576a7b67a833f9a3d80
parent c233e993bb49e007b667659243f344172768a6c8
author Patrick McHardy <kaber@trash.net> Fri, 26 Aug 2005 18:43:17 +0200
committer Patrick McHardy <kaber@trash.net> Fri, 26 Aug 2005 18:43:17 +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;
}
prev parent reply other threads:[~2005-08-26 16:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-22 0:03 [NETFILTER 1/4]: Fix HW checksum handling in ip_queue/ip6_queue Patrick McHardy
2005-08-22 6:32 ` David S. Miller
2005-08-23 16:20 ` David S. Miller
2005-08-26 11:11 ` Harald Welte
2005-08-26 16:45 ` Patrick McHardy [this message]
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=430F4722.80808@trash.net \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=laforge@netfilter.org \
--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.