The problem is that you are quoting an 8-byte header payload from RFC 792, Page 4 , but the requirements have been modified by RFC 1812 ...
Time Exceeded Message (in RFC 792) 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Code | Checksum | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | unused | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Internet Header + 64 bits of Original Data Datagram | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
RFC 1812, section 4.3.2.3 significantly increases the allowable payload in the ICMP error message (emphasis mine):
4.3.2.3 Original message header
Historically, each ICMP error message included an Internet header and at least the first 8 bytes of the datagram data that caused the error. This is no longer adequate due to the use of IP-in-IP tunneling and other technologies. Therefore, the ICMP datagram MUST contain as much of the original datagram as possible without the ICMP datagram length exceeding 576 bytes. the returned IP header (and user data) MUST be identical to that which, except that the router is not required to discard changes to the IP header that are normally made to those that were made before the error was detected (for example, decreasing TTL or update options).
ICMP errors that you generate from Scapy packets must contain all the information from the IP and TCP layers of the source packet.
source share