From patchwork Sun Aug 17 14:39:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4364 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:c414:b0:671:5a2c:6455 with SMTP id jt20csp884010mab; Sun, 17 Aug 2025 07:39:44 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU2aDl6npdbzQnDkNgm1xFNPwqIqF2FMSxI5jjEKbLLBDALk0IaWN8nXPdCtHftdEVXMfhYOd4inBg=@openvpn.net X-Google-Smtp-Source: AGHT+IHlngmP92yRmg1dGqIcW6Cr5+WB6Riwk4/+4dDDcMjcaUtQ3vmREjw3rLePZlCxq/cEYmxs X-Received: by 2002:a05:6808:1809:b0:434:ea7:1fb3 with SMTP id 5614622812f47-435ec4adac1mr4908599b6e.22.1755441583849; Sun, 17 Aug 2025 07:39:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1755441583; cv=none; d=google.com; s=arc-20240605; b=Q9bY6t6nT/OayXQ4uBnuHLpYgtbZ9Ubi6FGwavI+5qfRfRlO64UmbQJNBvIKfqQGGi 6/S2WXTQ3Uvtf1WQ0eojPasXAxNoux39/dV0gDTPl60Kh3A9FBHezIh6OpV5yMnHc0FL TbBIL21xrgBoHE+z9DYMZfQh0rOa38+9Yj3Tjq0iDxLUNOSQ+hDjNveK+LrfcbjsevJ9 3UXVy3J9UCZTzzs+EYjzsnofhcHNlV8moRhZeWRrnYbx9A6bgQwsg7Zk3X16JbPrE2Ob mwL8sVqjJd09nJkONx78JugEt6E2Nob2PAjZnP0lDnSUYbYfuEcUCtFBt2JmOy5D88dm nzug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature:dkim-signature; bh=CnPnPj2mOyKC8R4q+6Wsknyp8TWR8i63vkxPACwvOSk=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=UvMjGv3OxoSVYp2fS1GbtWiJ4WdrGUp7+Co/w8z1VwvmdidlkhG1hJmFHpIFp2Urrv TAQWYYcbhWq49e2al0KmSRdJCIbdN9y/8SEp7vPSmdiEr67PM5HOoTT0RfNwvsWmCQrq VuZ9efwquw71w3Z8qeG03XJElnVQHpY4Zg79aj6EuijW0YawFwmm1rJ4vF2jTfuM7iDQ DOgWY03CL6oeHYH6DNOl65XswsixhBESRgSyG1JXSw9EutngvIxaVRA6mxCO4CkKiLm7 3In9OWXaE2PW8VfWCSM3W+DQokYH59Ici/e1erHrTXO7uXXYKD4VqJxYRSyjObWszjWp Bkbw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=SSwlEVf7; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=MDPWK6Zw; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=d3ujwkpB; 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=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 5614622812f47-435ed24ac85si1116742b6e.132.2025.08.17.07.39.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Aug 2025 07:39:43 -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=pass header.i=@lists.sourceforge.net header.s=beta header.b=SSwlEVf7; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=MDPWK6Zw; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=d3ujwkpB; 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=muc.de DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:MIME-Version:References:In-Reply-To:Message-ID:Date:To:From:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=CnPnPj2mOyKC8R4q+6Wsknyp8TWR8i63vkxPACwvOSk=; b=SSwlEVf78/VFjvYepk7KlMlOcz Gpre6JmzDFafGYlfX+1eML1tRByHwrxnxVjtOk67fpyJzBv9nMWhm+pU5IPb1MeoE56qat95p7ZeM GoCprpwvN4rdVu8dsZjKy6cL6Lyq6lgsgRtP4CuwHEzSkG65JYCyWTlpgHffwfcpEu7E=; Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1uneXp-0004on-5F; Sun, 17 Aug 2025 14:39:37 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1uneXn-0004og-RN for openvpn-devel@lists.sourceforge.net; Sun, 17 Aug 2025 14:39:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=cYs0LgOv07ynRiKl4Y4wRrQl7zjvyWx8KqFnwNyl0E4=; b=MDPWK6ZwJRTZxSl/T9r0RPK3pj aPeJ5iFwxsLaKhITedsBYNOFZrbOucdVjWTE6Zxlqi9U94xMsoWnZYu124A/+ldQMFC9Uno2ibJvZ Id31ODIr8baAB1sFYrL+X6QyMRuAARuPibSDkeSEdnfqdJyWSprruxnlE/mnPqHVXR/s=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=cYs0LgOv07ynRiKl4Y4wRrQl7zjvyWx8KqFnwNyl0E4=; b=d3ujwkpBU12f99IbokLx4oagh1 tEx9Q46vx5CmsaVShpza/gE9LNoPp3QZbY7eNEA2xKx3uDKB59r1gYOxqwyK9qnZ2RVgfYm1vPIE6 Lw5O0Y79THJsaOBGfCHXfm0sdRpWG0qrI9o4TwUpxjm55uAf6/z27HRrL/V5hs4rM4Kc=; Received: from [193.149.48.143] (helo=blue.greenie.muc.de) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1uneXm-0005ST-Ne for openvpn-devel@lists.sourceforge.net; Sun, 17 Aug 2025 14:39:35 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.17.1.9/8.17.1.9) with ESMTP id 57HEdMuK018015 for ; Sun, 17 Aug 2025 16:39:22 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.1/8.18.1/Submit) id 57HEdMmw018014 for openvpn-devel@lists.sourceforge.net; Sun, 17 Aug 2025 16:39:22 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Sun, 17 Aug 2025 16:39:15 +0200 Message-ID: <20250817143922.17988-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.49.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "sfi-spamd-1.hosts.colo.sdot.me", 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: From: Frank Lichtenheld These are very local, simple fixes that do not warrant their own commit. Change-Id: Id565ec17856444b580dd89edab92e9fe18d39b77 Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering --- Content analysis details: (1.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1uneXm-0005ST-Ne Subject: [Openvpn-devel] [PATCH v3] Collect trivial conversion fixes 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: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1840713914420541728?= X-GMAIL-MSGID: =?utf-8?q?1840713914420541728?= From: Frank Lichtenheld These are very local, simple fixes that do not warrant their own commit. Change-Id: Id565ec17856444b580dd89edab92e9fe18d39b77 Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1140 This mail reflects revision 3 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering diff --git a/src/openvpn/crypto.c b/src/openvpn/crypto.c index af7583a..a63e543 100644 --- a/src/openvpn/crypto.c +++ b/src/openvpn/crypto.c @@ -1901,7 +1901,7 @@ const char *seed = "tls1-prf-test"; const char *secret = "tls1-prf-test-secret"; uint8_t out[8]; - uint8_t expected_out[] = { 'q', 'D', '\xfe', '%', '@', 's', 'u', '\x95' }; + uint8_t expected_out[] = { 'q', 'D', 0xfe, '%', '@', 's', 'u', 0x95 }; int ret = ssl_tls1_PRF((uint8_t *)seed, (int)strlen(seed), (uint8_t *)secret, (int)strlen(secret), out, sizeof(out)); diff --git a/src/openvpn/init.c b/src/openvpn/init.c index 40ae2c8..5583274 100644 --- a/src/openvpn/init.c +++ b/src/openvpn/init.c @@ -343,7 +343,7 @@ const char *status = (ce->flags & CE_DISABLED) ? "disabled" : "enabled"; /* space for output including 3 commas and a nul */ - int len = + size_t len = strlen(ce->remote) + strlen(ce->remote_port) + strlen(proto) + strlen(status) + 3 + 1; char *out = malloc(len); check_malloc_return(out); diff --git a/src/openvpn/options.c b/src/openvpn/options.c index d4dc0d3..d1c41d4 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -4957,7 +4957,7 @@ #endif static inline bool -space(unsigned char c) +space(char c) { return c == '\0' || isspace(c); } diff --git a/src/openvpn/pool.c b/src/openvpn/pool.c index 898a045..a41364a 100644 --- a/src/openvpn/pool.c +++ b/src/openvpn/pool.c @@ -158,7 +158,7 @@ switch (pool->ipv4.type) { case IFCONFIG_POOL_30NET: - pool->ipv4.base = start & ~3; + pool->ipv4.base = start & ~3u; pool_ipv4_size = (((end | 3) + 1) - pool->ipv4.base) >> 2; break;