fix no marker pdu fragmentation epan/dissectors/packet-iwarp-mpa.c ws-metze/20190120 ws-metze/20191020
authorStefan Metzmacher <metze@samba.org>
Wed, 22 Aug 2018 20:44:27 +0000 (22:44 +0200)
committerStefan Metzmacher <metze@samba.org>
Sun, 20 Jan 2019 22:14:58 +0000 (23:14 +0100)
Change-Id: Ie0af4110e7395893e17542729c697758b6b21654

epan/dissectors/packet-iwarp-mpa.c

index 8aeb2a8..fe183b7 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);