crc32 fix

This commit is contained in:
Alfredo Cardigliano
2017-05-23 20:00:10 +02:00
parent cf1402d64e
commit 3cfcc05912
3 changed files with 12 additions and 10 deletions
+1 -2
View File
@@ -1865,8 +1865,7 @@ static void pcap_process_packet(u_char *args,
trailer->master_protocol = htons(p.master_protocol), trailer->app_protocol = htons(p.app_protocol);
ndpi_protocol2name(ndpi_thread_info[thread_id].workflow->ndpi_struct, p, trailer->name, sizeof(trailer->name));
crc = (uint32_t*)&extcap_buf[h.caplen+sizeof(struct ndpi_packet_trailer)];
*crc = 0;
ethernet_crc32((const void*)extcap_buf, h.caplen+sizeof(struct ndpi_packet_trailer), crc);
*crc = ethernet_crc32((const void*)extcap_buf, h.caplen+sizeof(struct ndpi_packet_trailer));
h.caplen += delta, h.len += delta;
#ifdef DEBUG_TRACE