tcpudpipchecksumttl

TTL field and IP checksum


If I change the time-to-live (TTL) field in an IP packet, should I also recompute the IP checksum?

And what about the checksum at the transport layer ? Will that have to change too?


Solution

  • Yes. If you change any field in the IP header, the checksum must be updated.

    As for the checksum at the transport layer, it theoretically depends what the transport protocol is... however in practice I do not believe there exist any transport protocols whose checksums cover the IP TTL field. Certainly the pseudo headers for both TCP and UDP don't cover it.