Don't try reassembly on fragments sliced short during capture.
While we're at it, get rid of an unnecessary argument passed to the defragmentation routines - it's always equal to the rpc_defragment preference variable, so just use that. Bug: 11913 Change-Id: Ia3b14ca11ae4fb423bcba4debb7c62245d8aed43 Reviewed-on: https://code.wireshark.org/review/13860 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
ab977a86d0
commit
c487d44e5d
|
@ -3224,7 +3224,7 @@ call_message_dissector(tvbuff_t *tvb, tvbuff_t *rec_tvb, packet_info *pinfo,
|
|||
static int
|
||||
dissect_rpc_fragment(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
||||
proto_tree *tree, rec_dissector_t dissector, gboolean is_heur,
|
||||
int proto, int ett, gboolean defragment, gboolean first_pdu, struct tcpinfo *tcpinfo)
|
||||
int proto, int ett, gboolean first_pdu, struct tcpinfo *tcpinfo)
|
||||
{
|
||||
guint32 seq;
|
||||
guint32 rpc_rm;
|
||||
|
@ -3365,8 +3365,12 @@ dissect_rpc_fragment(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
/*
|
||||
* If we're not defragmenting, just hand this to the
|
||||
* disssector.
|
||||
*
|
||||
* We defragment only if we should (rpc_defragment true) *and*
|
||||
* we can (tvb_len == tvb_reported_len, so that we have all the
|
||||
* data in the fragment).
|
||||
*/
|
||||
if (!defragment) {
|
||||
if (!rpc_defragment || tvb_len != tvb_reported_len) {
|
||||
/*
|
||||
* This is the first fragment we've seen, and it's also
|
||||
* the last fragment; that means the record wasn't
|
||||
|
@ -3767,7 +3771,7 @@ static int
|
|||
find_and_dissect_rpc_fragment(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
||||
proto_tree *tree, rec_dissector_t dissector,
|
||||
gboolean is_heur,
|
||||
int proto, int ett, gboolean defragment, struct tcpinfo* tcpinfo)
|
||||
int proto, int ett, struct tcpinfo* tcpinfo)
|
||||
{
|
||||
|
||||
int offReply;
|
||||
|
@ -3782,7 +3786,6 @@ find_and_dissect_rpc_fragment(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
len = dissect_rpc_fragment(tvb, offReply,
|
||||
pinfo, tree,
|
||||
dissector, is_heur, proto, ett,
|
||||
defragment,
|
||||
TRUE /* force first-pdu state */, tcpinfo);
|
||||
|
||||
/* misses are reported as-is */
|
||||
|
@ -3827,7 +3830,7 @@ dissect_rpc_tcp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
*/
|
||||
len = dissect_rpc_fragment(tvb, offset, pinfo, tree,
|
||||
dissect_rpc_message, is_heur, proto_rpc, ett_rpc,
|
||||
rpc_defragment, first_pdu, tcpinfo);
|
||||
first_pdu, tcpinfo);
|
||||
|
||||
if ((len == 0) && first_pdu && rpc_find_fragment_start) {
|
||||
/*
|
||||
|
@ -3836,7 +3839,7 @@ dissect_rpc_tcp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
*/
|
||||
len = find_and_dissect_rpc_fragment(tvb, offset, pinfo, tree,
|
||||
dissect_rpc_message, is_heur, proto_rpc, ett_rpc,
|
||||
rpc_defragment, tcpinfo);
|
||||
tcpinfo);
|
||||
}
|
||||
|
||||
first_pdu = FALSE;
|
||||
|
|
Loading…
Reference in New Issue