diff options
Diffstat (limited to 'net')
-rw-r--r-- | 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 index 249bddb28acd..f81fe8c52e99 100644 --- a/net/netfilter/nfnetlink_queue.c +++ b/net/netfilter/nfnetlink_queue.c | |||
@@ -371,6 +371,12 @@ nfqnl_build_packet_message(struct nfqnl_instance *queue, | |||
371 | break; | 371 | break; |
372 | 372 | ||
373 | case NFQNL_COPY_PACKET: | 373 | case NFQNL_COPY_PACKET: |
374 | if (entry->skb->ip_summed == CHECKSUM_HW && | ||
375 | (*errp = skb_checksum_help(entry->skb, | ||
376 | entry->info->outdev == NULL))) { | ||
377 | spin_unlock_bh(&queue->lock); | ||
378 | return NULL; | ||
379 | } | ||
374 | if (queue->copy_range == 0 | 380 | if (queue->copy_range == 0 |
375 | || queue->copy_range > entry->skb->len) | 381 | || queue->copy_range > entry->skb->len) |
376 | data_len = entry->skb->len; | 382 | data_len = entry->skb->len; |
@@ -636,7 +642,7 @@ nfqnl_mangle(void *data, int data_len, struct nfqnl_queue_entry *e) | |||
636 | if (!skb_make_writable(&e->skb, data_len)) | 642 | if (!skb_make_writable(&e->skb, data_len)) |
637 | return -ENOMEM; | 643 | return -ENOMEM; |
638 | memcpy(e->skb->data, data, data_len); | 644 | memcpy(e->skb->data, data, data_len); |
639 | 645 | e->skb->ip_summed = CHECKSUM_NONE; | |
640 | return 0; | 646 | return 0; |
641 | } | 647 | } |
642 | 648 | ||