test: add imitate_tcp_packet test case (TCP over GREv0: GRE enable checksum)

This commit is contained in:
luwenpeng
2024-07-15 15:07:38 +08:00
parent d31cfd02fd
commit 07ce636f64
13 changed files with 408 additions and 150 deletions

View File

@@ -723,7 +723,7 @@ static struct packet *ip_frag_reassemble(struct ip_reassembly *assy, struct ip_f
ip4_hdr_set_mf_flag(ip4_hdr, false); // update more fragment flag
ip4_hdr_set_frag_offset(ip4_hdr, 0); // update fragment offset
ip4_hdr->ip_sum = 0; // update checksum
ip4_hdr->ip_sum = checksum((const char *)ip4_hdr, flow->hdr.l3_len);
ip4_hdr->ip_sum = checksum((const void *)ip4_hdr, flow->hdr.l3_len);
}
else
{