Do not use user specified LEN field for csum calculation which is quite dangerous.
Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen_l4.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/trafgen_l4.c b/trafgen_l4.c index c109675..79c5914 100644 --- a/trafgen_l4.c +++ b/trafgen_l4.c @@ -44,8 +44,6 @@ static void udp_packet_finish(struct proto_hdr *hdr) if (!lower) return; - total_len = proto_field_get_u16(hdr, UDP_LEN); - switch (lower->id) { case PROTO_IP4: csum = p4_csum((void *) proto_header_ptr(lower), proto_header_ptr(hdr), -- 2.6.3 -- You received this message because you are subscribed to the Google Groups "netsniff-ng" group. To unsubscribe from this group and stop receiving emails from it, send an email to netsniff-ng+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.