mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
[NETFILTER]: Fix HW checksum handling in nfnetlink_queue
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
03486a4f83
commit
e7dfb09a36
1 changed files with 7 additions and 1 deletions
|
@ -371,6 +371,12 @@ nfqnl_build_packet_message(struct nfqnl_instance *queue,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NFQNL_COPY_PACKET:
|
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
|
if (queue->copy_range == 0
|
||||||
|| queue->copy_range > entry->skb->len)
|
|| queue->copy_range > entry->skb->len)
|
||||||
data_len = entry->skb->len;
|
data_len = entry->skb->len;
|
||||||
|
@ -636,7 +642,7 @@ nfqnl_mangle(void *data, int data_len, struct nfqnl_queue_entry *e)
|
||||||
if (!skb_make_writable(&e->skb, data_len))
|
if (!skb_make_writable(&e->skb, data_len))
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
memcpy(e->skb->data, data, data_len);
|
memcpy(e->skb->data, data, data_len);
|
||||||
|
e->skb->ip_summed = CHECKSUM_NONE;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue