ISAKMP: fix Cisco fragmentation support.

Last flag wasn't mapping to 'more fragments' properly, and reassembly
should only be attempted on the last frame.

Bug: 7940
Change-Id: I565f2b72b6eb68dc32e0f57a43a098a8f203a800
Reviewed-on: https://code.wireshark.org/review/9073
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
This commit is contained in:
Martin Mathieson 2015-06-23 14:01:22 -07:00
parent e53337accf
commit d4f6480253
1 changed files with 3 additions and 3 deletions

View File

@ -3931,18 +3931,18 @@ dissect_cisco_fragmentation(tvbuff_t *tvb, int offset, int length, proto_tree *t
NULL,
seq-1, /* fragment sequence number, starting from 0 */
tvb_reported_length_remaining(tvb, offset), /* fragment length - to the end */
last); /* More fragments? */
!last); /* More fragments? */
defrag_isakmp_tvb = process_reassembled_data(tvb, offset, pinfo,
"Reassembled ISAKMP", frag_msg,
&isakmp_frag_items, /* groups and items, using same as Cisco */
NULL, ptree);
if (defrag_isakmp_tvb) { /* take it all */
if (last && defrag_isakmp_tvb) { /* take it all */
dissect_isakmp(defrag_isakmp_tvb, pinfo, ptree, NULL);
}
col_append_fstr(pinfo->cinfo, COL_INFO,
" (%sMessage fragment %u%s)",
(frag_msg ? "Reassembled + " : ""),
(last && frag_msg ? "Reassembled + " : ""),
seq, (last ? " - last" : ""));
pinfo->fragmented = save_fragmented;
}