Re: tcp checksum calculation

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

 



TCP checksum includes the psuedo-header (some fields of the IP
header - see Richard stevens or the RFC for details). If the psuedo-header
changes, TCP checksum needs to be re-calculated or "adjusted".


----- Original Message -----
From: Abhijit Gadgil <gabhijit@ee.iitb.ac.in>
To: Amit Shah <shahamit@gmx.net>
Cc: <linux-india-programmers@lists.sourceforge.net>;
<kernelnewbies@nl.linux.org>
Sent: Monday, February 18, 2002 1:43 PM
Subject: Re: tcp checksum calculation


>
> Read rfc793 page 15, carefully. I think you will have to recalculate the
> checksum. Because you are changing the destination address field. Perhaps
> the nat code pointed to by someone may help you find out how exactly to do
> it.
>
> -abhijit
>
>
> 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)?
>
> --
> 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/
>
>
--
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