From 6fe93724ecbb62b9c281f6a79edddffb53f6d2b6 Mon Sep 17 00:00:00 2001
From: Michael Tuexen <tuexen@fh-muenster.de>
Date: Thu, 8 Feb 2018 16:13:40 +0100
Subject: [PATCH] Fix the verification of MID in I-FORWARD-TSN chunks.

Thanks to Timo Voelker for finding and reporting the bug.
---
 gtests/net/packetdrill/run_packet.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/gtests/net/packetdrill/run_packet.c b/gtests/net/packetdrill/run_packet.c
index 63006167..8d3e6ac0 100644
--- a/gtests/net/packetdrill/run_packet.c
+++ b/gtests/net/packetdrill/run_packet.c
@@ -2339,11 +2339,10 @@ static int verify_i_forward_tsn_chunk(struct sctp_i_forward_tsn_chunk *actual_ch
 		                        ntohs(script_chunk->stream_identifier_blocks[i].reserved),
 		                        ntohs(actual_chunk->stream_identifier_blocks[i].reserved),
 		                        error) == STATUS_ERR ||
-			    check_field("sctp_i_forward_tsn_message_identifier",
-		                        ntohs(script_chunk->stream_identifier_blocks[i].message_identifier),
-		                        ntohs(actual_chunk->stream_identifier_blocks[i].message_identifier),
-		                        error) == STATUS_ERR 
-				) {
+		           check_field("sctp_i_forward_tsn_message_identifier",
+		                        ntohl(script_chunk->stream_identifier_blocks[i].message_identifier),
+		                        ntohl(actual_chunk->stream_identifier_blocks[i].message_identifier),
+		                        error) == STATUS_ERR) {
 				return STATUS_ERR;
 			}
 		}
-- 
GitLab