fix no marker pdu fragmentation epan/dissectors/packet-iwarp-mpa.c ws-metze/20181017
authorStefan Metzmacher <metze@samba.org>
Wed, 22 Aug 2018 20:44:27 +0000 (22:44 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 17 Oct 2018 14:09:07 +0000 (16:09 +0200)
Change-Id: Ie0af4110e7395893e17542729c697758b6b21654

epan/dissectors/packet-iwarp-mpa.c

index 8aeb2a88bffa6941ebff5cc4353e9f110ba0f844..fe183b7c76d6239d3066f2400c4e4bb9250cb6c0 100644 (file)
@@ -690,9 +690,11 @@ dissect_mpa_fpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
                 * always either with a Marker or the ULPDU_LENGTH header field.
                 */
                pad_length = fpdu_pad_length(ulpdu_length);
-               exp_ulpdu_length = expected_ulpdu_length(state, tcpinfo, endpoint);
-               if (!exp_ulpdu_length || exp_ulpdu_length != (ulpdu_length + pad_length)) {
-                       return 0;
+               if (num_of_m > 0) {
+                       exp_ulpdu_length = expected_ulpdu_length(state, tcpinfo, endpoint);
+                       if (!exp_ulpdu_length || exp_ulpdu_length != (ulpdu_length + pad_length)) {
+                               return 0;
+                       }
                }
 
                mpa_packetlist(pinfo, MPA_FPDU);
@@ -712,7 +714,7 @@ dissect_mpa_fpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
                                MPA_ULPDU_LENGTH_LEN, ulpdu_length);
 
                /* Markers are present in this FPDU */
-               if (state->minfo[endpoint].valid && num_of_m > 0) {
+               if (num_of_m > 0) {
 
                        total_length = fpdu_total_length(tcpinfo);