Re: [patch nf-next] IPVS: ICMPv6 checksum calculation

From: xiaoyu Du
Date: Sun Aug 22 2010 - 22:54:42 EST


Yes, I had added it and test it, it works.

2010/8/20 Julian Anastasov <ja@xxxxxx>:
>
> Â Â Â ÂHello,
>
> On Fri, 20 Aug 2010, xiaoyu Du wrote:
>
>> I just replied to thank for his idea then, as he gived me some ideas
>> on how to manipulate
>> checksum. I tested the code today, but it doesn't seem to work. (I just wrote a
>> netfilter module and hooked the code on local_out , then ping6 the
>> address on another PC,
>> It failed.). I'll find out why.
>
> Â Â Â ÂMay be because I copied csum_ipv6_magic() code from
> your patch. Please, try with one '~' before csum_ipv6_magic.
>
>> >> >>> Â Â Âicmph->icmp6_cksum = csum_ipv6_magic(&iph->saddr,
>> >> >>> Â Â Â Â Â Â Â&iph->daddr,
>> >> >>> Â Â Â Â Â Â Âskb->len - icmp_offset, IPPROTO_ICMPV6,
>> >> >>> Â Â Â Â Â Â Â0);
>> >> >>> Â Â Âskb->csum_start = skb_network_header(skb) - skb->head +
>> >> >>> Â Â Â Â Â Â Â Â Â Â Â Âicmp_offset;
>> >> >>> Â Â Âskb->csum_offset = offsetof(struct icmp6hdr, icmp6_cksum);
>> >> >>> Â Â Âskb->ip_summed = CHECKSUM_PARTIAL;
>
> Regards
>
> --
> Julian Anastasov <ja@xxxxxx>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/