scroot / gopacket

Automatically exported from code.google.com/p/gopacket
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

GRE decoding incorrect if sequence number incorrect if checksum present bit is not set #50

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a GRE packet where checksum present bit is not set but sequence bit 
is set
2. Pass the packet to DecodeFromBytes
3. The decode sequence number is incorrect

What is the expected output? What do you see instead?
The sequence number is incorrect.  It appears that the next layer's data is 
used.

What version of the product are you using? On what operating system?
Ubuntu 14.04

Please provide any additional information below.
According to RFC 2784, checksum and reserved1/offset will not be present if 
checksum present field is not set.  However, this is not what is being coded.

Original issue reported on code.google.com by adrian.c...@gmail.com on 25 Nov 2014 at 11:25

GoogleCodeExporter commented 9 years ago
Hey, thanks for the report!  Sorry for the slow reply, thanksgiving got in the 
way.

Do you happen to have a pcap with a packet I can use to test this out?

Original comment by gconnell@google.com on 1 Dec 2014 at 6:29

GoogleCodeExporter commented 9 years ago
Sorry for the late reply.  I have worked on the patch and it can be found in 
http://pastebin.com/9JV0VVYQ

Original comment by adrian.c...@gmail.com on 4 Dec 2014 at 4:00