Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5924
b: refs/heads/master
c: 66a79a1
h: refs/heads/master
v: v3
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Aug 23, 2005
1 parent c150c6d commit e6d21a6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1344a41637114485fac7afa1505bce2ff862807a
refs/heads/master: 66a79a19a7c582efd99bb143c3a59fbda006eb39
7 changes: 7 additions & 0 deletions trunk/net/ipv4/netfilter/ip_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,12 @@ ipq_build_packet_message(struct ipq_queue_entry *entry, int *errp)
break;

case IPQ_COPY_PACKET:
if (entry->skb->ip_summed == CHECKSUM_HW &&
(*errp = skb_checksum_help(entry->skb,
entry->info->outdev == NULL))) {
read_unlock_bh(&queue_lock);
return NULL;
}
if (copy_range == 0 || copy_range > entry->skb->len)
data_len = entry->skb->len;
else
Expand Down Expand Up @@ -385,6 +391,7 @@ ipq_mangle_ipv4(ipq_verdict_msg_t *v, struct ipq_queue_entry *e)
if (!skb_ip_make_writable(&e->skb, v->data_len))
return -ENOMEM;
memcpy(e->skb->data, v->payload, v->data_len);
e->skb->ip_summed = CHECKSUM_NONE;
e->skb->nfcache |= NFC_ALTERED;

/*
Expand Down
7 changes: 7 additions & 0 deletions trunk/net/ipv6/netfilter/ip6_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,12 @@ ipq_build_packet_message(struct ipq_queue_entry *entry, int *errp)
break;

case IPQ_COPY_PACKET:
if (entry->skb->ip_summed == CHECKSUM_HW &&
(*errp = skb_checksum_help(entry->skb,
entry->info->outdev == NULL))) {
read_unlock_bh(&queue_lock);
return NULL;
}
if (copy_range == 0 || copy_range > entry->skb->len)
data_len = entry->skb->len;
else
Expand Down Expand Up @@ -381,6 +387,7 @@ ipq_mangle_ipv6(ipq_verdict_msg_t *v, struct ipq_queue_entry *e)
if (!skb_ip_make_writable(&e->skb, v->data_len))
return -ENOMEM;
memcpy(e->skb->data, v->payload, v->data_len);
e->skb->ip_summed = CHECKSUM_NONE;
e->skb->nfcache |= NFC_ALTERED;

/*
Expand Down

0 comments on commit e6d21a6

Please sign in to comment.