From 641ca7e6c02e0ed18fdbeda05aad69958b873efb Mon Sep 17 00:00:00 2001
From: Michael Tuexen <tuexen@fh-muenster.de>
Date: Sat, 7 Oct 2017 12:14:21 +0200
Subject: [PATCH] Fix CID 187196.

---
 gtests/net/packetdrill/sctp_packet.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/gtests/net/packetdrill/sctp_packet.c b/gtests/net/packetdrill/sctp_packet.c
index a90193a2..689756e8 100644
--- a/gtests/net/packetdrill/sctp_packet.c
+++ b/gtests/net/packetdrill/sctp_packet.c
@@ -3496,7 +3496,6 @@ new_sctp_generic_packet(int address_family,
 	const int sctp_header_bytes = sizeof(struct sctp_common_header);
 	const int sctp_chunk_bytes = bytes->nr_entries;
 	int ip_bytes;
-	bool overbook = false;
 	bool encapsulate = (udp_src_port > 0) || (udp_dst_port > 0);
 	u16 i;
 
@@ -3530,8 +3529,8 @@ new_sctp_generic_packet(int address_family,
 	}
 
 	/* Allocate and zero out a packet object of the desired size */
-	packet = packet_new(overbook ? MAX_SCTP_DATAGRAM_BYTES : ip_bytes);
-	memset(packet->buffer, 0, overbook ? MAX_SCTP_DATAGRAM_BYTES : ip_bytes);
+	packet = packet_new(ip_bytes);
+	memset(packet->buffer, 0, ip_bytes);
 
 	packet->direction = direction;
 	packet->flags = FLAGS_SCTP_GENERIC_PACKET;
-- 
GitLab