  yaplej CCNA Premium join:2001-02-10 White City, OR
·Charter Pipeline
| Bad TCP checksum generated by LKM
I have been working on a Linux Kernel Module that will accelerate network traffic. Its been a slow go as I am learning both C, and kernel development.
I have a nearly finished prototype now, but ran into a wall. The module processes network packets using the function in packetprocessor.h. It inserts custom TCP options into the network packets so other devices running the module can detect each other. Its similar to what commercial WAN accelerators do.
I found that the module starts creating bad TCP checksum at line #112 of packetprocessor.h . This makes me think there is something wrong with __set_tcp_option() in tcpoptions.h.
Whats confusing is that the same function worked fine at line #62, 63, 94, and 95 without any problems. Maybe someone can look though __set_tcp_option() in tcpoptions.h, and possibly at the code in packetprocessor.h around line #112.
I have been looking at this for a while, and cannot figure out where its getting mucked up. -- sk_buff what?
Open Source WAN Accelerator »trafficsqueezer.sourceforge.net/
|
|
  yaplej CCNA Premium join:2001-02-10 White City, OR
·Charter Pipeline
| I finally figured out why I was getting bad checksum. The variable tcplen was an __u8, and tcplen should actually be __u16.
tcpoptions.h
-- sk_buff what?
Open Source WAN Accelerator »trafficsqueezer.sourceforge.net/
|
|