RE: ICMPv6 Checksum Calculation Error
2012-01-04 23:42:39 GMT
Set the checksum to None and it will auto change it to the correct one for you, I had this problem before
For example in one of my programs I have:
In this case I had a “packet list” of packets so packets_in is packet 1, its payload is IP, that payload is ICMP, and then I change the cksum on the ICMP or whatever top end header that has a cksum
From: Vishal Malhan [mailto:malhanvishal <at> gmail.com]
Sent: Wednesday, January 04, 2012 6:30 AM
To: scapy.ml <at> secdev.org
Subject: Re: [scapy.ml] ICMPv6 Checksum Calculation Error
Yeah, sendp sends at layer2, thats why we insert the Ether header as well...
If i give fill the correct checksum in cksum variable in ICMPv6EchoRequest,
the echo reply does come and things work... The issue is with the checksum
that is autofilled...
On Wed, Jan 4, 2012 at 3:32 PM, César A. Bernardini <mesarpe <at> gmail.com> wrote:
I can't resolve your problem, but I found that you are doing something
wrongly about the sendp function. The sendp function works at layer 2
and send functions is the one you are looking for (layer 3).
Hope it helps!
2012/1/4 Vishal Malhan <malhanvishal <at> gmail.com>:
> I am trying to send a ICMPv6 fragmented packet using scapy. The packet gets
> sent but i don't see the echo reply coming.
> I checked the generated packet in wireshark and saw the checksum generated
> was wrong. Supplying a correct checksum saw the reply coming.
> Is this a known issue in scapy?
> I am using scapy version 2.2.0 on Centos 5.6 x68_64 platform.
> The packets that i constructed is as follows:
> Note that I had to supply Ether header as well. If I don't supply the Ether
> header, the packet doesn't reach the destination host.
> Also I tried using the in6_chksum() scapy fn to calculate the checksum
> directly to supply but the checksum generated was still not matching.
> I tried
> csum=in6_chksum(58, pkt1, 'a'*1440)
> csum=in6_chksum(58, pkt1, 'a'*2048)
> None of above solved the issue.
> Pls advice.
To unsubscribe, send a mail to scapy.ml-unsubscribe <at> secdev.org