Re: tcp checksum calculation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Try looking at the following file:
    /usr/src/linux-2.4.7-10/net/ipv4/ip_nat_dumb.c
I guess this will help you solve the problem. There are intricacies while
calculating the transport-level checksum - have a special eye on that !

-Pradeep

On Thu, 14 Feb 2002, Amit Shah wrote:

> 
> 
> Hi,
>    I have a function(in the kernel, ip_rcv_finish... before the ip
> forwarding code.) that takes in packets, replaces the dest. ip:port, and
> sends to that machine. (ip forwarding is enabled.) I need to recalculate
> the checksum..... ip checksumming works fine(ip_fast_csum)... but, the tcp
> checksum is shown as incorrect on ethereal. The packets are not delivered
> to the new dest.... 
> 
> Also, what is the skb->csum, in case there is no data (e.g.  for ACK or
> FIN -only packets)?
> 

-- 
-Pradeep
-----------------------------------
Let us be the change, we wish to see in this world.
                        --- Mahatma Gandhi
-----------------------------------
Pradeep Jagannath
pradeep@it.iitb.ernet.in
http://www.it.iitb.ernet.in/~pradeep

-----------------------------------

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux