kbandla / libdnet

Automatically exported from code.google.com/p/libdnet
Other
1 stars 0 forks source link

Bad ip packets sent in tunnel linux 2.6 (x86 and x86_64) #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
option a:
1. Compile the library
2. Make any application that sends ip packets
3. start application
4. Read packets via tcpdump
option b:
1. Compile the library
2. Make a simple icmp echo application
3. start ping on the virtual tunnel interface.
4. observe that the kernel does not understand the icmp replies

What is the expected output? What do you see instead?
The level2 ethernet type is 0x0000 when it should be 0x0800

What version of the product are you using? On what operating system?
With 1.11 , RHEL4 (x86, kernel 2.6.24.2, gcc 3.4.6), RHEL5 (x86 and x86_64,
default kernel(2.6.18-53), gcc 4.1.2)

Please provide any additional information below.
The fix, at least on intel cpu for recent 2.6 kernels is a htonl and a
change in the way the size of a parameter is calculated.
I have not verified this patch on earlier kernels or 2.4 branch kernels

Original issue reported on code.google.com by cvie...@gmail.com on 28 Mar 2008 at 6:28

Attachments:

GoogleCodeExporter commented 9 years ago
comment for the patch

The line iov[0].iov_len should stay the same assign and assign size of the 
variable, not the type it uses. This just in case the variables type changes. 
It's unfortunate that variable itself is named type here.

Original comment by ruzicka....@gmail.com on 13 Aug 2010 at 11:42

GoogleCodeExporter commented 9 years ago
Fixed in r658. Sorry for the... egregious delay.

Original comment by dugsong on 7 Sep 2010 at 5:23