Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 56676C55179 for ; Mon, 3 Aug 2026 14:11:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Type:Cc:Reply-To:From: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:MIME-Version:Message-ID:References:Date:Sender:To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: List-Owner; bh=oR/c7iWDpzYBO11RFEOVnWDRm5PYZifN2kXZ1e6XiJE=; b=jEEFmoi0zjEJH8 jH65mbbvxU0uh38Z9R5kXPI5kezSE60UBIkYUN4QFVWc0fjpZ0/6y34//XeYiUI1MD1RL6uEtGvns 1NNrPxXtf2JlzvVJB4wAEeNSV0qhJEj6hioboQ9O9JGSoJpdTV7wPYc301jkOw871DFSdhchLk6tz 34I=; Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1wqtNy-00063r-79; Mon, 03 Aug 2026 14:11:19 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1wqtNw-00063k-HF for openvpn-devel@lists.sourceforge.net; Mon, 03 Aug 2026 14:11:18 +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:Subject:References:List-Unsubscribe:List-Id:Cc:Date:From :Sender:To: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=hGUR5juyvZ9/hjCZXdOZOBaS5JQNQB2GO/mGkY/rzuM=; b=ZZj2klQFFSMBTSksP7dRlBXgVv 6oChFdXU7wk86rnSPCRjI1HblBPIUggzV4C3JUIXzIIliV5SwM7GWa6Lqc1KBItK5XRuLtXv+0LUC 5OlA6rhlBgjU7/TO7b2mudB0/Lv2ykCfFskUwGqzCzxFWgEaS5wiAUlqLyHi0vJZsD10=; 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: Subject:References:List-Unsubscribe:List-Id:Cc:Date:From:Sender:To: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=hGUR5juyvZ9/hjCZXdOZOBaS5JQNQB2GO/mGkY/rzuM=; b=m tyTITf73KV6lUQPWGWi68IB/NPt/oc2A8iQAPBZ2x05hZdH1Wmo3YVGY++MgWmSYcYwW+wFjITZK+ ODEmOl7PUhY15dg4VUQoUNhb3PhAA9tscbrlhQvcehmhRNHWz6I56dfXNghTec6sXpSVnYroAmkdr HtlSnvthqzcS6lSY=; Received: from mail-wm1-f47.google.com ([209.85.128.47]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1wqtNt-0004wM-An for openvpn-devel@lists.sourceforge.net; Mon, 03 Aug 2026 14:11:17 +0000 Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-4953e04ef16so22078315e9.2 for ; Mon, 03 Aug 2026 07:11:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvpn.net; s=google; t=1785766271; x=1786371071; darn=lists.sourceforge.net; h=content-type:user-agent:content-disposition :content-transfer-encoding:mime-version:message-id:reply-to:subject :thread-index:references:list-unsubscribe:list-id:auto-submitted:cc :date:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=hGUR5juyvZ9/hjCZXdOZOBaS5JQNQB2GO/mGkY/rzuM=; b=b8q/IYiMBef/YakUua2mmxHIc9fxpXCtAyy+KhMV8ppFVWAC1T4JL0mmIaK70t+tKs QHdYxJ/aS1u3HehrswfPQpryq4lDVus9bBd7fkWSVwYNtt6DxF19wSb1RNNaAWD+MuOJ nZqSOeA7cwD1w/NE6AFAGFhButt17sSxfZY+W4HElpPA9ZROm5Sj0gIIuCNkJHkHDUam OYg5wdzhy81MIJNhuE8fC0aI9zEp6AgiJvP0tNSvsmyq9xjb7zoFpB5kG65wVi2GXjKT EvEqSvURejqIkROo8yrYfAN6E+Z+aYBa59qFSM2HS8cvC+BdX9neq8g9WpTf11ZiDlYb DnKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785766271; x=1786371071; h=content-type:user-agent:content-disposition :content-transfer-encoding:mime-version:message-id:reply-to:subject :thread-index:references:list-unsubscribe:list-id:auto-submitted:cc :date:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=hGUR5juyvZ9/hjCZXdOZOBaS5JQNQB2GO/mGkY/rzuM=; b=ehkvRyxqulrNWpU4WHhVM6bGmomrmTNqfeTdQsFXaEf5FFVybB4UDL8RWWC7J6RG+F /8jOuZZvCXIQNOl293Qz+elSKz8EoiMYw9Klyqh+C0rvYLmQsliBWe6XzWqRRnpTcJoS jXn9WHdVEp6cjYoayOFgSFRlI49X8Bshg0dMBvn20NUrkKzKXjIxwelI10ok+CPbD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id 5b1f17b1804b1-4980c67474amr187754045e9.13.1785766270556; Mon, 03 Aug 2026 07:11:10 -0700 (PDT) Received: from ip-10-18-1-162.eu-central-1.compute.internal (ec2-18-159-0-78.eu-central-1.compute.amazonaws.com. [18.159.0.78]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4980878dbaesm399016765e9.12.2026.08.03.07.11.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2026 07:11:10 -0700 (PDT) X-Google-Original-From: "plaisthos (Code Review)" Date: Mon, 3 Aug 2026 14:11:09 +0000 Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange X-Gerrit-PatchSet: 1 X-Gerrit-Change-Id: I3db70001be7f39cf84d562517647f1a305962b42 X-Gerrit-Change-Number: 1834 X-Gerrit-Project: openvpn X-Gerrit-ChangeURL: X-Gerrit-Commit: 33b81344a5ff26c81db9e93bc98c6ce2fa974d97 References: Thread-Index: PGdlcnJpdC4xNzg1NzY2MjYwMDAwLkkzZGI3MDAwMWJlN2YzOWNmODRkNTYyNTE3NjQ3ZjFhMzA1OTYyYjQyQGdlcnJpdC5vcGVudnBuLm5ldD4= Message-ID: MIME-Version: 1.0 User-Agent: Gerrit/3.11.5 X-Headers-End: 1wqtNt-0004wM-An Subject: [Openvpn-devel] [S] Change in openvpn[master]: Remove local get_random in test_misc.c 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: , From: "plaisthos \(Code Review\) via Openvpn-devel" Reply-To: arne-openvpn@rfc2549.org, openvpn-devel@lists.sourceforge.net Cc: "plaisthos \(Code Review\)" , openvpn-devel Content-Type: multipart/mixed; boundary="===============6539555916348876115==" Errors-To: openvpn-devel-bounces@lists.sourceforge.net --===============6539555916348876115== Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="LyLTOgWmEkY="; charset=UTF-8 --LyLTOgWmEkY= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable plaisthos has uploaded this change for review=2E ( http://gerrit=2Eopenvpn= =2Enet/c/openvpn/+/1834?usp=3Demail ) Change subject: Remove local get_ra= ndom in test_misc=2Ec =2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E= =2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E= =2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E= =2E=2E=2E Remove local get_random in test_misc=2Ec The get_random in test= _misc=2Ec conflicts with the get_random function that OpenVPN defines in cr= ypto=2Eh Also adjust the implementation in mock_get_random=2Ec to match the= prototype in crypto=2Eh Change-Id: I3db70001be7f39cf84d562517647f1a305962= b42 Signed-off-by: Arne Schwabe --- M tests/unit_tests= /openvpn/mock_get_random=2Ec M tests/unit_tests/openvpn/test_misc=2Ec 2 fil= es changed, 3 insertions(+), 9 deletions(-) git pull ssh://gerrit=2Eop= envpn=2Enet:29418/openvpn refs/changes/34/1834/1 diff --git a/tests/unit_t= ests/openvpn/mock_get_random=2Ec b/tests/unit_tests/openvpn/mock_get_random= =2Ec index 0840e31=2E=2E5cb768b 100644 --- a/tests/unit_tests/openvpn/mock_= get_random=2Ec +++ b/tests/unit_tests/openvpn/mock_get_random=2Ec @@ -28,7 = +28,7 @@ #include #include -unsigned long +in= t64_t get_random(void) { /* rand() is not very random, but it's C99 = and this is just for testing */ diff --git a/tests/unit_tests/openvpn/test_= misc=2Ec b/tests/unit_tests/openvpn/test_misc=2Ec index 501286c=2E=2E8da7ab= e 100644 --- a/tests/unit_tests/openvpn/test_misc=2Ec +++ b/tests/unit_test= s/openvpn/test_misc=2Ec @@ -38,6 +38,7 @@ #include "test_common=2Eh" #inc= lude "list=2Eh" #include "mock_msg=2Eh" +#include "crypto=2Eh" #ifdef _WI= N32 #include "win32-util=2Eh" #endif @@ -141,13 +142,6 @@ return str= cmp((const char *)key1, (const char *)key2) =3D=3D 0; } -static uint32_t= -get_random(void) -{ - /* rand() is not very random, but it's C99 and t= his is just for testing */ - return (uint32_t)rand(); -} - static struc= t hash_element * hash_lookup_by_value(struct hash *hash, void *value) { @= @ -263,7 +257,7 @@ { struct hash_iterator hi; = struct hash_element *he; - inc =3D (get_random() % 3) + 1;= + inc =3D ((uint32_t)get_random() % 3) + 1; hash_i= terator_init_range(hash, &hi, base, base + inc); while ((he = =3D hash_iterator_next(&hi))) -- To view, visit http://gerrit=2Eopenvpn= =2Enet/c/openvpn/+/1834?usp=3Demail To unsubscribe, or for help writing mai= l filters, visit http://gerrit=2Eopenvpn=2Enet/settings?usp=3Demail Gerrit= -MessageType: newchange Gerrit-Project: openvpn Gerrit-Branch: master Gerri= t-Change-Id: I3db70001be7f39cf84d562517647f1a305962b42 Gerrit-Change-Number= : 1834 Gerrit-PatchSet: 1 Gerrit-Owner: plaisthos Gerrit-CC: openvpn-devel --LyLTOgWmEkY= Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

plaisthos has upl= oaded this change for review=2E

View Change

Remove local get_random in test_misc=2Ec

The get_random in = test_misc=2Ec conflicts
with the get_random function that OpenVPN define= s in crypto=2Eh
Also adjust the implementation in mock_get_random=2Ec to= match the
prototype in crypto=2Eh

Change-Id: I3db70001be7f39cf84= d562517647f1a305962b42
Signed-off-by: Arne Schwabe <arne@rfc2549=2Eor= g>
---
M tests/unit_tests/openvpn/mock_get_random=2Ec
M tests/u= nit_tests/openvpn/test_misc=2Ec
2 files changed, 3 insertions(+), 9 dele= tions(-)

git pull ssh://gerrit=2Eopenvpn=2Enet:2=
9418/openvpn refs/changes/34/1834/1
diff --git a/tests/unit_tests/o=
penvpn/mock_get_random=2Ec b/tests/unit_tests/openvpn/mock_get_random=2Ec
index 0840e31=2E=2E5cb768b 100644
--- a/test= s/unit_tests/openvpn/mock_get_random=2Ec
+++ b/tests/unit_t= ests/openvpn/mock_get_random=2Ec
@@ -28,7 +28,7 @@ #include <stdint=2Eh>
#include <cmocka= =2Eh>

-unsigned long
+i= nt64_t
get_random(void)
{
/* rand() is not very random, but it's C99 and this is just for t= esting */

diff --git a/tests/unit_tests/openvpn/test_misc= =2Ec b/tests/unit_tests/openvpn/test_misc=2Ec
index 501286c= =2E=2E8da7abe 100644
--- a/tests/unit_tests/openvpn/test_mi= sc=2Ec
+++ b/tests/unit_tests/openvpn/test_misc=2Ec<= br>@@ -38,6 +38,7 @@
#include "test_common=2Eh&= quot;
#include "list=2Eh"
#incl= ude "mock_msg=2Eh"
+#include "crypto=2Eh"
#ifdef _WIN32
#include "win32-util=2Eh"
#endif
@@ -141,13 +142,6 @@
return strcmp((con= st char *)key1, (const char *)key2) =3D=3D 0;
}
=
-static uint32_= t
-get_random(void)
-{
- /* rand() is not very random, but it= 9;s C99 and this is just for testing */
- return (uint32_t)rand();
-}
-
static struct hash_element *
hash_l= ookup_by_value(struct hash *hash, void *value)
{@@ -263,7 +257,7 @@
{
= struct hash_iterator hi;
struct hash_e= lement *he;
- = inc =3D (get_random() % 3) + 1;
+ inc =3D ((uint32_t)get_random() % 3) + 1;<= br> hash_iterator_init_range(hash, &hi, base, base + = inc);

while ((he =3D hash_it= erator_next(&hi)))

To view, visit <= a href=3D"http://gerrit=2Eopenvpn=2Enet/c/openvpn/+/1834?usp=3Demail">chang= e 1834=2E To unsubscribe, or for help writing mail filters, visit settings=2E

<= div style=3D"display:none"> Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change= -Id: I3db70001be7f39cf84d562517647f1a305962b42
Gerrit-Change-Number: 1834
Gerr= it-PatchSet: 1
Gerrit-Owner: plaisthos = <arne-openvpn@rfc2549=2Eorg>
Gerr= it-CC: openvpn-devel <openvpn-devel@lists=2Esourceforge=2Enet>
= --LyLTOgWmEkY=-- --===============6539555916348876115== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============6539555916348876115== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel --===============6539555916348876115==--