Add packet_build.cpp support imitate_tcp_packet() / imitate_udp_packet()

This commit is contained in:
luwenpeng
2024-04-24 11:40:00 +08:00
parent ffead24e45
commit d8963af5f8
16 changed files with 444 additions and 441 deletions

View File

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