From patchwork Tue Jun 4 15:01:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "plaisthos (Code Review)" X-Patchwork-Id: 3717 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:ab0:2492:0:b0:80a:cfd8:f00 with SMTP id i18csp2642537uan; Tue, 4 Jun 2024 08:02:29 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUpXidHknGKgkjPecev/vPQsJSmm5qsa4R6OKrlXil8sgPO7yjgdoZNmiGnfxg9+jC/uIWWv+0c6zHiWN989L/MYaW2TZI= X-Google-Smtp-Source: AGHT+IGTQYw/rPGgRizA8BCsixGQ+1nWnQ0mfAaFk7MRMeTTVPsOc69W6faF53mMh4g5sJc0Pw6d X-Received: by 2002:a17:90b:1b4b:b0:2c2:5b8a:ef9a with SMTP id 98e67ed59e1d1-2c25b8af113mr929596a91.1.1717513348617; Tue, 04 Jun 2024 08:02:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717513348; cv=none; d=google.com; s=arc-20160816; b=lanbbaLqedTn/IZVZyzho806UF7FQ2EXVTxlRVAq2+kHbN/xqa8P5nf5txS3n6B+LP uHi/tbXAIC25kFLh+LQ9cuK9t8S2p1ip93VSUPxIYPu0/Uc25n11MS5MBhNq+JO9/EUw SVG6lVf8SHsWtzon5EQ/cxo+FlzRcQcfujwvMwGdBAEpAs/EKeMEGhHXHvl9hNbcllCh tQ7iTSfzd6uPn/APYUJLpLqhLtkL/i6/0EA+UDYQ7S/pA65nQfRBWzqesNPr4j5KPBms 7Tp3La5ZraKSC3tqILbaKuDeR7tvo13RsXpWvjtSeMSwrwQeKC5jRSgv0h4aUare5ZcD DaYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:cc:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:user-agent :mime-version:message-id:references:auto-submitted:to:date:from :dkim-signature:dkim-signature:dkim-signature; bh=5OmDeVbreUrGEysZRscR7DCPnKtnI5cVo/8UEOkFeiA=; fh=GFP4qDxgyJ2WEPo/oeLZg3Mj4NqvY1j2nTvTt7psNwg=; b=avyXyyzyUxUE5TdwS7iGz2te70dsx+DOElYUy7mlNKvHvBeklQbolxE6e20XSLxk1F 9jDlYcVNcYKfPXObJJFqAFOjML9ZMmAOI9NMX91HrJuxlxEEZACBwHn1gwIijaHgjAXo Iu6sroAOH1cs+R7/FMCvLM2y1PIk+eAJHyQ08Q+rs2fV5y9Cc8Vyodw+P4K39QRQsMol Mu+uxSqSXZs+zFpP85fmYRBbxv7dI1skGOXoLTWr8t3K2a764h6zxipfr0RXDsGMBNva DflXjeUQYrJoo+hezpSwPQ5pXU4+2Y/6Vykg+DVlAepthBad+CpR+BazNc8j/QAWxkyD 9JWw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=Jnl+yrY7; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=D1zn91Gg; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=dlg0DfkN; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=openvpn.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c1c283e7c1si775438a91.134.2024.06.04.08.02.28 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Jun 2024 08:02:28 -0700 (PDT) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=Jnl+yrY7; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=D1zn91Gg; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=dlg0DfkN; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=openvpn.net Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1sEVfi-0000IK-JL; Tue, 04 Jun 2024 15:01:58 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1sEVfg-0000ID-PZ for openvpn-devel@lists.sourceforge.net; Tue, 04 Jun 2024 15:01:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Content-Transfer-Encoding:MIME-Version :Message-ID:Reply-To:References:Subject:List-Unsubscribe:List-Id:Cc:To:Date: From:Sender:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help: List-Subscribe:List-Post:List-Owner:List-Archive; bh=L0Sn/DLivMlcjwpPPvg6zfYhZg4vpOG3WbbFOAz+78o=; b=Jnl+yrY7hIQKwhsYuV/zO/HkvQ Dnex1KrYhDfTIm0s6CGZD612t7eBzJ2q9ZwaoV/HOqtOUe+l3ALjrb/G4ClLQG/o2Irtm7D+/8H4H 66Kq3P50qsJXajaTL5mfguoo8Pv3rVedcVStpqkEeFzslCbi/Gm7pLjF06okPyLRevrA=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Reply-To: References:Subject:List-Unsubscribe:List-Id:Cc:To:Date:From:Sender:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help:List-Subscribe:List-Post: List-Owner:List-Archive; bh=L0Sn/DLivMlcjwpPPvg6zfYhZg4vpOG3WbbFOAz+78o=; b=D 1zn91Ggpr3TLJLHILhjkmWcm7A50f40+oT4zl0U3zaDz03fRPD3ns1tWGVj+GlUXau9/u2W53ngLo hzuSkNyZl8CjUjnLYiQin7znnKpWjMqN7IzBz6NxorgWE+K6uUF+DulHHavoxZGw1ijxD9cldA/vA iZz6ioTcbtREcI98=; Received: from mail-wm1-f53.google.com ([209.85.128.53]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1sEVfg-0004Ko-M4 for openvpn-devel@lists.sourceforge.net; Tue, 04 Jun 2024 15:01:57 +0000 Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-421338c4c3bso11538825e9.1 for ; Tue, 04 Jun 2024 08:01:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvpn.net; s=google; t=1717513304; x=1718118104; darn=lists.sourceforge.net; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from:from:to:cc :subject:date:message-id:reply-to; bh=L0Sn/DLivMlcjwpPPvg6zfYhZg4vpOG3WbbFOAz+78o=; b=dlg0DfkNXaBCq4bRS1U87p5nztfzwGi58Ac9FbNNZkyPf7ZE8sRPt8Lwrg7b+D+D4o ZnQzMSMpH5yAJQ5X2qpfCwreJ/KIoCZh/OFRBVhn77gW+U0scQhthmUHyTgDr1b2D9nQ mUq3adYDWaKvVqve3SgeVBX/6qrRpAIxY28gaxGBeNgljwWrr0R60zgQPOjRc21+rVew S8kiWkfCO3Wn5K/tulfOgdNH5BW4DpSHDUHFiAVTPXiMmkRkzrZbsOf2IJP3lZvn4isZ j6hARhikfy/Oh0j29MmSXiRkAgegaWWEiDvyUyyCFLumJkGwL/NtcBU9f3qGm/mCvkl9 IO7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717513304; x=1718118104; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=L0Sn/DLivMlcjwpPPvg6zfYhZg4vpOG3WbbFOAz+78o=; b=adJMmIrfTEEtts6eggxtcNXq87uZkVeXzW+f12Eqki/uA3tsZ4pXqwJtWt+0tRfJI+ 8i/5BSda4HT0Rnmrqy9nbz2gq2tTFQSarkHLk0GHUUs+6iV7mNObAg8EZT6OsUvKKaK1 3Rk1c2SuQN8MaxLQ4Flh4T7NRdR/1lBh2wJZQbv3m2RyvtMRKYduh0SXPBpo2LP2s3Pf kInkWjQYf8p1fZrEQuPH59YrBIuq+M+fdszxasQWVeZ1CzohbBsVHaS4v5/+diumY7BH /7vo5525l3xoMWhxijL+Ua0hVAokHMQlLFc3mDft+YHkiRipXsouayn6uIV45mM55YhI eOEQ== X-Gm-Message-State: AOJu0YzAMFv3OxCNs6/cOyQApcO62illCd4OzyvbhTOTzkAz511B4Uov kq19GsAU3CchECo8uiPVru7V9iiQGofKBUTMtpyR8+b3/aLk2KlLqnVDk/SccUwmXgBJsfbV9nt P X-Received: by 2002:a05:600c:444e:b0:420:f8a2:f2eb with SMTP id 5b1f17b1804b1-4212e061c6bmr106694975e9.19.1717513304131; Tue, 04 Jun 2024 08:01:44 -0700 (PDT) Received: from gerrit.openvpn.in (ec2-18-159-0-78.eu-central-1.compute.amazonaws.com. [18.159.0.78]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4212b8a4cb3sm160490035e9.35.2024.06.04.08.01.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 08:01:43 -0700 (PDT) From: "flichtenheld (Code Review)" X-Google-Original-From: "flichtenheld (Code Review)" X-Gerrit-PatchSet: 1 Date: Tue, 4 Jun 2024 15:01:43 +0000 To: plaisthos Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange X-Gerrit-Change-Id: I32ee28fde5d38d736f753c782d88a81de7fe2980 X-Gerrit-Change-Number: 642 X-Gerrit-Project: openvpn X-Gerrit-ChangeURL: X-Gerrit-Commit: d4ebd6c49edc7a50139b97d3b564cd658fe403ce References: Message-ID: <425409ca95aef27b97e7e0c8f60a106a5fb8c36c-HTML@gerrit.openvpn.net> MIME-Version: 1.0 User-Agent: Gerrit/3.8.2 X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-1.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to do a code review. Please visit Content analysis details: (-0.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: cmake.in] 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [209.85.128.53 listed in sa-accredit.habeas.com] 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [209.85.128.53 listed in bl.score.senderscore.com] 0.0 RCVD_IN_DNSWL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to DNSWL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [209.85.128.53 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.53 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 WEIRD_PORT URI: Uses non-standard port number for HTTP 0.0 HTML_MESSAGE BODY: HTML included in message 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 T_SCC_BODY_TEXT_LINE No description available. 0.0 T_KAM_HTML_FONT_INVALID Test for Invalidly Named or Formatted Colors in HTML X-Headers-End: 1sEVfg-0004Ko-M4 Subject: [Openvpn-devel] [S] Change in openvpn[master]: LZO: do not use lzoutils.h macros 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: , Reply-To: frank@lichtenheld.com, arne-openvpn@rfc2549.org, openvpn-devel@lists.sourceforge.net Cc: openvpn-devel Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1800943276960850402?= X-GMAIL-MSGID: =?utf-8?q?1800943276960850402?= X-getmail-filter-classifier: gerrit message type newchange Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/642?usp=email to review the following change. Change subject: LZO: do not use lzoutils.h macros ...................................................................... LZO: do not use lzoutils.h macros Instead of lzo_{free,malloc} we can just use the free and malloc as the lzoutils.h header itself suggests. Change-Id: I32ee28fde5d38d736f753c782d88a81de7fe2980 Signed-off-by: Frank Lichtenheld --- M config.h.cmake.in M configure.ac M src/openvpn/lzo.c M src/openvpn/lzo.h 4 files changed, 4 insertions(+), 21 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/42/642/1 diff --git a/config.h.cmake.in b/config.h.cmake.in index 2cdfdcc..effca2a 100644 --- a/config.h.cmake.in +++ b/config.h.cmake.in @@ -184,9 +184,6 @@ /* Define to 1 if you have the header file. */ #define HAVE_LZO1X_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_LZOUTIL_H 1 - /* Define to 1 if you have the `mlockall' function. */ #cmakedefine HAVE_MLOCKALL diff --git a/configure.ac b/configure.ac index d834f30..bb87c59 100644 --- a/configure.ac +++ b/configure.ac @@ -1174,15 +1174,6 @@ saved_CFLAGS="${CFLAGS}" CFLAGS="${CFLAGS} ${LZO_CFLAGS}" AC_CHECK_HEADERS( - [lzo/lzoutil.h], - , - [AC_CHECK_HEADERS( - [lzoutil.h], - , - [AC_MSG_ERROR([lzoutil.h is missing])] - )] - ) - AC_CHECK_HEADERS( [lzo/lzo1x.h], , [AC_CHECK_HEADERS( diff --git a/src/openvpn/lzo.c b/src/openvpn/lzo.c index b313284..bab2d78 100644 --- a/src/openvpn/lzo.c +++ b/src/openvpn/lzo.c @@ -107,14 +107,14 @@ { 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); + compctx->wu.lzo.wmem = (lzo_voidp) malloc(compctx->wu.lzo.wmem_size); check_malloc_return(compctx->wu.lzo.wmem); } static void lzo_compress_uninit(struct compress_context *compctx) { - lzo_free(compctx->wu.lzo.wmem); + free(compctx->wu.lzo.wmem); compctx->wu.lzo.wmem = NULL; } diff --git a/src/openvpn/lzo.h b/src/openvpn/lzo.h index e951b49..62d73a1 100644 --- a/src/openvpn/lzo.h +++ b/src/openvpn/lzo.h @@ -40,16 +40,11 @@ #if defined(HAVE_LZO_CONF_H) /* The lzo.h magic gets confused and still wants * to include lzo/lzoconf.h even if our include paths - * are setup to include the paths without lzo/ include lzoconf.h to - * avoid it being include by lzoutil.h */ + * are setup to include the paths without lzo/ + */ #include #include #endif -#if defined(HAVE_LZO_LZOUTIL_H) -#include -#elif defined(HAVE_LZOUTIL_H) -#include -#endif #if defined(HAVE_LZO_LZO1X_H) #include #elif defined(HAVE_LZO1X_H)