aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tcp.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2006-08-31 23:00:44 +0000
committerUlf Lamping <ulf.lamping@web.de>2006-08-31 23:00:44 +0000
commita0dbf3d7ac2627a56d570421d9b1d92727aa9ccc (patch)
tree0524a9fb17385601e756c8b4671ca4debbe7f6f6 /epan/dissectors/packet-tcp.c
parent04f35c220a2ea304948d86cda6e9a68745d84312 (diff)
mark the "short segment" message field as generated and add an expert_info to it
svn path=/trunk/; revision=19106
Diffstat (limited to 'epan/dissectors/packet-tcp.c')
-rw-r--r--epan/dissectors/packet-tcp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c
index 1f11043dd2..920e4ea07c 100644
--- a/epan/dissectors/packet-tcp.c
+++ b/epan/dissectors/packet-tcp.c
@@ -2129,9 +2129,12 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (!pinfo->fragmented && !pinfo->in_error_pkt) {
if (reported_len < tcph->th_hlen) {
- proto_tree_add_text(tcp_tree, tvb, offset, 0,
+ proto_item *pi;
+ pi = proto_tree_add_text(tcp_tree, tvb, offset, 0,
"Short segment. Segment/fragment does not contain a full TCP header"
" (might be NMAP or someone else deliberately sending unusual packets)");
+ PROTO_ITEM_SET_GENERATED(pi);
+ expert_add_info_format(pinfo, pi, PI_MALFORMED, PI_WARN, "Short segment");
tcph->th_have_seglen = FALSE;
} else {
/* Compute the length of data in this segment. */