--- packet-udp.c.orig 2006-01-02 11:50:50.000000000 +0000
+++ packet-udp.c 2006-01-08 20:29:03.000000000 +0000
@@ -224,8 +224,15 @@
return;
}
if (tree) {
- proto_tree_add_uint(udp_tree, hf_udp_length, tvb, offset + 4, 2, udph->uh_ulen);
- proto_tree_add_uint_hidden(udp_tree, hf_udplite_checksum_coverage, tvb, offset + 4, 0, udph->uh_sum_cov);
+ if ((udph->uh_ulen > pinfo->iplen - pinfo->iphdrlen) && ! pinfo->fragmented) {
+ proto_tree_add_uint_format(udp_tree, hf_udp_length, tvb, offset + 4, 2,
+ udph->uh_ulen, "Length: %u (bogus, should be %u)", udph->uh_ulen,
+ pinfo->iplen - pinfo->iphdrlen);
+ } else {
+ proto_tree_add_uint(udp_tree, hf_udp_length, tvb, offset + 4, 2, udph->uh_ulen);
+ proto_tree_add_uint_hidden(udp_tree, hf_udplite_checksum_coverage, tvb, offset + 4,
+ 0, udph->uh_sum_cov);
+ }
}
} else {
udph->uh_ulen = pinfo->iplen - pinfo->iphdrlen;
Powered by MHonArc 2.6.10