* [NETFILTER 5/8]: Fix HW checksum handling in nfnetlink_queue
@ 2005-09-06 17:55 Patrick McHardy
0 siblings, 0 replies; only message in thread
From: Patrick McHardy @ 2005-09-06 17:55 UTC (permalink / raw)
To: David S. Miller; +Cc: Netfilter Development Mailinglist
[-- 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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-09-06 17:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-06 17:55 [NETFILTER 5/8]: Fix HW checksum handling in nfnetlink_queue Patrick McHardy
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.