From ab286246dc22d446b7d149f23c231ba8dbd6b640 Mon Sep 17 00:00:00 2001 From: Martin Mathieson Date: Tue, 3 Jan 2017 14:23:13 -0800 Subject: Ensure that tcp.reassembled_in is added to the tree for first segment. Bug: 3264 Change-Id: I9fa8cfaf1e21a8a984941ee40e2e404ae21e55c9 Reviewed-on: https://code.wireshark.org/review/19528 Petri-Dish: Martin Mathieson Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- epan/dissectors/packet-tcp.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'epan') diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c index 93a15bed5a..6fd413352c 100644 --- a/epan/dissectors/packet-tcp.c +++ b/epan/dissectors/packet-tcp.c @@ -2921,6 +2921,17 @@ again: /* TCP analysis already flags this (in COL_INFO) as a retransmission--if it's enabled */ } + /* Fix for bug 3264: look up ipfd for this (first) segment, + so can add tcp.reassembled_in generated field on this code path. */ + ipfd_head = fragment_get(&tcp_reassembly_table, pinfo, pinfo->num, NULL); + if (ipfd_head) { + if (ipfd_head->reassembled_in != 0) { + item = proto_tree_add_uint(tcp_tree, hf_tcp_reassembled_in, tvb, 0, + 0, ipfd_head->reassembled_in); + PROTO_ITEM_SET_GENERATED(item); + } + } + nbytes = tvb_reported_length_remaining(tvb, offset); proto_tree_add_bytes_format(tcp_tree, hf_tcp_segment_data, tvb, offset, @@ -2929,7 +2940,7 @@ again: return; } - /* The above code only finds retransmission if the PDU boundaries and the seq coinside I think + /* The above code only finds retransmission if the PDU boundaries and the seq coincide I think * If we have sequence analysis active use the TCP_A_RETRANSMISSION flag. * XXXX Could the above code be improved? */ -- cgit v1.2.3