Reputation: 22933
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?
Upvotes: 2
Views: 3844
Reputation: 41
Yes. According to RFC 791
A checksum on the header only. Since some header fields change (e.g., time to live), this is recomputed and verified at each point that the internet header is processed.
Upvotes: 2
Reputation: 1077
Yes, if you change the TTL field, then you have to change the checksum also because checksum is related to TTL field.
Also, TTL will be changed at every hop. Since TTL is changing at every hop, so checksum will also be changed.
Upvotes: 2
Reputation: 22261
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.
Upvotes: 3