Browse code

sipdump: init checksum filed

- silent analyzer

Daniel-Constantin Mierla authored on 08/09/2020 10:48:15
Showing 1 changed files
... ...
@@ -182,6 +182,7 @@ void sipdump_write_pcap(FILE *fs, sipdump_data_t *spd)
182 182
 	v_pcap_udp_header.src = ntohs(spd->src_port);
183 183
 	v_pcap_udp_header.dst = ntohs(spd->dst_port);
184 184
 	v_pcap_udp_header.length = ntohs(sizeof(struct pcap_udp_header) + data.len);
185
+	v_pcap_udp_header.checksum = 0;
185 186
 
186 187
 	/* IP header */
187 188
 	if (spd->afid == AF_INET6) {
... ...
@@ -243,4 +244,4 @@ void sipdump_write_pcap(FILE *fs, sipdump_data_t *spd)
243 244
 		LM_ERR("writing UDP payload to pcap failed: %s\n", strerror(errno));
244 245
 	}
245 246
 	fflush(fs);
246
-}
247 247
\ No newline at end of file
248
+}