Le mardi 24 août 2010 à 20:25 +0300, Plamen Petrov a écrit :
Thanks !
csum_offset = 16.
so its offsetof(struct tcphdr, check)
maybe a bug in net/ipv4/netfilter/nf_nat_helper.c ?
We should trace all spots where we set csum_start/csum_offset
Or/And trace the skb content.
Please add a :
print_hex_dump(KERN_ERR, "skb data:", DUMP_PREFIX_OFFSET,
16, 1, skb->head, skb_end_pointer(skb)-skb->head,true);
call in skb_csum_start_bug(), right after the pr_err("\n") and before
the "return 1;"
int skb_csum_start_bug(const struct sk_buff *skb, int pos)
{
if (skb->ip_summed == CHECKSUM_PARTIAL) {
long csstart;
csstart = skb->csum_start - skb_headroom(skb);
if (WARN_ON(csstart > skb_headlen(skb))) {
int i;
pr_err("%d: csum_start %u, offset %u, headroom %d, headlen %d, len %d\n",
pos, skb->csum_start, skb->csum_offset, skb_headroom(skb),
skb_headlen(skb), skb->len);
pr_err("nr_frags=%u gso_size=%u ",
skb_shinfo(skb)->nr_frags,
skb_shinfo(skb)->gso_size);
for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
pr_err("frag_size=%u ", skb_shinfo(skb)->frags[i].size);
}
pr_err("\n");
print_hex_dump(KERN_ERR, "skb data:", DUMP_PREFIX_OFFSET,
16, 1, skb->head, skb_end_pointer(skb) - skb->head, true);
return 1;
}
}
return 0;
}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html