From patchwork Thu Jul 12 22:19:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 413 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director10.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net (Dovecot) with LMTP id BQmuAutgSFteEQAAIUCqbw for ; Fri, 13 Jul 2018 04:20:59 -0400 Received: from proxy16.mail.ord1d.rsapps.net ([172.30.191.6]) by director10.mail.ord1d.rsapps.net (Dovecot) with LMTP id 21BEKetgSFuYXAAApN4f7A ; Fri, 13 Jul 2018 04:20:59 -0400 Received: from smtp28.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy16.mail.ord1d.rsapps.net with LMTP id GH4YKetgSFuDJwAAetu3IA ; Fri, 13 Jul 2018 04:20:59 -0400 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp28.gate.ord1d.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dmarc=none (p=nil; dis=none) header.from=greenie.muc.de X-Suspicious-Flag: YES X-Classification-ID: aba2b3f4-8675-11e8-8001-525400ea129b-1-1 Received: from [216.105.38.7] ([216.105.38.7:12342] helo=lists.sourceforge.net) by smtp28.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.1.56364 r(Core:4.2.1.14)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id AB/4F-31335-BE0684B5; Fri, 13 Jul 2018 04:20:59 -0400 Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1fdtJ7-0004EQ-FB; Fri, 13 Jul 2018 08:20:05 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1fdtJ5-0004EJ-Vb for openvpn-devel@lists.sourceforge.net; Fri, 13 Jul 2018 08:20:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=f9GQY3jbRptkcWgDuHuWvfO9lXtR8xyE2DI+YahrR7k=; b=YJ0noq1iiBlKERnYX7PAPDLmXd NNcVIFsOSwhqVSzbJ2yPw19fAzqQ4w4uIhX1jGmuFB/JJEVi3U+FPkcuUYRDJ8HsFI03yqUvYU/sE 85nYEZerkM4I1DUOq5uKUY5fLepYQRUZc5h6Mjmikkeng3CVxI8/XaD+kxY0RX8Taa9o=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:MIME-Version: Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=f9GQY3jbRptkcWgDuHuWvfO9lXtR8xyE2DI+YahrR7k=; b=ZYqX/+uvXFxbMD6+jsBQBZYP8V 6qclchE61pu2qW22kYZxI916YUsCi4Gy/BGQJ7Cp/SyYSEty8/hXQtAF5pbaoH7rF4pu/coGVF7h/ CRAcforXC0cedZ4bXqMNtSQgYlJoPD2TN0JFWnL9RPyQptnIS0NiqNf/E9BHgEy9A02o=; Received: from chekov.greenie.muc.de ([193.149.48.178]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) id 1fdtJ3-007shq-L0 for openvpn-devel@lists.sourceforge.net; Fri, 13 Jul 2018 08:20:03 +0000 Received: from chekov.greenie.muc.de (localhost [127.0.0.1]) by chekov.greenie.muc.de (8.15.2/8.15.2) with ESMTPS id w6D8JpwQ031216 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 13 Jul 2018 10:19:51 +0200 (CEST) (envelope-from gert@chekov.greenie.muc.de) Received: (from gert@localhost) by chekov.greenie.muc.de (8.15.2/8.15.2/Submit) id w6D8JpSM031215 for openvpn-devel@lists.sourceforge.net; Fri, 13 Jul 2018 10:19:51 +0200 (CEST) (envelope-from gert) From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Fri, 13 Jul 2018 10:19:51 +0200 Message-Id: <20180713081951.31174-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.18.0 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. X-Headers-End: 1fdtJ3-007shq-L0 Subject: [Openvpn-devel] [PATCH] Print lzo_init() return code in case of errors X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox This can help pinpointing what exactly went wrong in case of init failures (library version mismatch, memory issues, ...) Signed-off-by: Gert Doering --- src/openvpn/lzo.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/openvpn/lzo.c b/src/openvpn/lzo.c index 8d9efea..e3be6ad 100644 --- a/src/openvpn/lzo.c +++ b/src/openvpn/lzo.c @@ -103,9 +103,11 @@ lzo_compress_init(struct compress_context *compctx) msg(D_INIT_MEDIUM, "LZO compression initializing"); ASSERT(!(compctx->flags & COMP_F_SWAP)); compctx->wu.lzo.wmem_size = LZO_WORKSPACE; - if (lzo_init() != LZO_E_OK) + + int lzo_status = lzo_init(); + if (lzo_status != LZO_E_OK) { - msg(M_FATAL, "Cannot initialize LZO compression library"); + msg(M_FATAL, "Cannot initialize LZO compression library (lzo_init() returns %d)", lzo_status); } compctx->wu.lzo.wmem = (lzo_voidp) lzo_malloc(compctx->wu.lzo.wmem_size); check_malloc_return(compctx->wu.lzo.wmem);