From patchwork Tue Oct 28 12:20:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4534 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:2995:b0:72f:f16c:e055 with SMTP id f21csp1999611max; Tue, 28 Oct 2025 05:20:46 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUJuZpoZMzK+SaAQWMLUSkZW3IAcIXjWgSQLimKreTNxgtp4+P8171QlHtcuf9j1imUaRJKUzUSd+w=@openvpn.net X-Google-Smtp-Source: AGHT+IHN5+UwiVXnpttfVCv7Tw+0raPfSKt6hmk/QFtzbNUc7//BRQGhqigaOWRWNZs3tJlqqk/h X-Received: by 2002:a05:6e02:3708:b0:430:a183:7b with SMTP id e9e14a558f8ab-4320f7a87b5mr58598955ab.3.1761654046629; Tue, 28 Oct 2025 05:20:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1761654046; cv=none; d=google.com; s=arc-20240605; b=g35lQoRS1EyzBdRrpVlTrEG1mwHxzSNRuRmSyt0yrYeVjIpgEQImYX+xXxUaNhvDSH Uq4gLHzdn+yaS6VRsbpWIToW4U58gkpaclk7BNaFDsYJ1Zl44eyFOBMVdPYhTkyvi8Yw +HdlGvZo2iMV6JIGx5D0zy6+JrwPUr+vkCd8xro9KD7c4xHNEXaR8H/jurB4q/qZ4foQ B2vQipQ7vUP9+gdwOi+k1HQtv3u//EYKtVgr/iIhRwQyxMI6Z29Ug6KotlhbaKXqjA/V 7ggTAKfjS0z7B1m3ydoHh9OUlHA3Fs7nrNeMElSiPbxLRo7L8DNbldrmGlDAiGD4VElQ gmtw== 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=Qqh9qDjdP4r8TEH4E8sKurdynMl8zCjmzfJsNDvHDL0=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=YrP5iOhLCWBtOGh6WMCcFe2akucqFbcA5osH9tvTQgVEA83QKMQ3qiFndUsLJN3Mj8 Jo4PqizpwJOqVYPtwLM3PvQsIPUWnJlcfL6vfqxF9aP5omcDZi9ZiMTlhsjTnQgTawEd Bkgvqfgay4//3woRdWytl+bUCmriKAql0M7HnkTvbvcmpTP56U5AQ6xF3drNO4WbzUhe IREjFAf2wXs7biZ9NiESTFM1ImUdkOnBlTInB/LKRo+HMFIjrdWradxHanWWaBUO4rmZ 9pWN3BNGU5VCeQKQ0Aa/EoFzkNyJGtqGoeEaWJ7U7f9uW7cC7454s45br53muQ4wIYOT Ac4w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=FspdYRY6; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="QFZZt2/B"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="bH/M9axJ"; 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 e9e14a558f8ab-431f7e39abfsi73359835ab.104.2025.10.28.05.20.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Oct 2025 05:20:46 -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=FspdYRY6; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="QFZZt2/B"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="bH/M9axJ"; 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=Qqh9qDjdP4r8TEH4E8sKurdynMl8zCjmzfJsNDvHDL0=; b=FspdYRY6gJdXzqTuFtuFb4i3Hv brhuCsN0CBKxdvIcOw93hwEVythz7+UhVYygNOd00rzV5fBuAgqoUEYJwtuVfa+stxeJenBHDWE/b abHig0UZHNnDKDJAw+bFtBYq/h2ebkZN+3IJ568oyC9ZL0510xDIR/Iqp9PD6MzkqRSU=; 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.95) (envelope-from ) id 1vDigu-0004cU-0M; Tue, 28 Oct 2025 12:20:44 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1vDigr-0004cL-UI for openvpn-devel@lists.sourceforge.net; Tue, 28 Oct 2025 12:20:41 +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=vq8n+tHCmXYmWt67G2n6M6sb2osidUjJAVU9FNnMjhk=; b=QFZZt2/BlK/2ESNOIu/elTzb+U 5aUbc2UtHTNPtZ/PU/u7MJR+xmwzGA/pKhcrcraQog08HAn6EnAo96JCq888+5XitpK+hkspBHUtc fAMUjQkKvucpGMkRyDR0AyGPkhL51DGqm/QMT4d7aVgmKf1RyU7+5aO3hILSgDT4MPyU=; 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=vq8n+tHCmXYmWt67G2n6M6sb2osidUjJAVU9FNnMjhk=; b=bH/M9axJjdSAkus1VoCgDSTvHM aBqKnm1C7Vb6qywtlZgc0TYYdQ9eFsl3aaaeJVrTQ+gwWNaQvTj9GHud1AmOCTwJN7lFukhBEy4S+ mBI/mWUy0xncjl/CTzpR2ge96cSZa21mJKv9do+0gLdFQrwt92mJL4iXvgbwasUwedK0=; Received: from [193.149.48.134] (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 1vDigr-0002Ws-3u for openvpn-devel@lists.sourceforge.net; Tue, 28 Oct 2025 12:20:41 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.18.1/8.18.1) with ESMTP id 59SCKTAL024648 for ; Tue, 28 Oct 2025 13:20:29 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.1/8.18.1/Submit) id 59SCKTIJ024647 for openvpn-devel@lists.sourceforge.net; Tue, 28 Oct 2025 13:20:29 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Tue, 28 Oct 2025 13:20:23 +0100 Message-ID: <20251028122028.24628-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 obsolete since the removal of pf feature. Avoids spurious conversion warnings. Change-Id: I501bf780957a9c685eed5994a15de09c28efc3f0 Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/open [...] 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: 1vDigr-0002Ws-3u Subject: [Openvpn-devel] [PATCH v2] mroute: Remove unused mask argument of mroute_get_in* 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?1847228153667518461?= X-GMAIL-MSGID: =?utf-8?q?1847228153667518461?= From: Frank Lichtenheld These are obsolete since the removal of pf feature. Avoids spurious conversion warnings. Change-Id: I501bf780957a9c685eed5994a15de09c28efc3f0 Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1309 --- 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/+/1309 This mail reflects revision 2 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering diff --git a/src/openvpn/mroute.c b/src/openvpn/mroute.c index 88ea647..b50d48f 100644 --- a/src/openvpn/mroute.c +++ b/src/openvpn/mroute.c @@ -103,17 +103,12 @@ return true; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - static inline void -mroute_get_in_addr_t(struct mroute_addr *ma, const in_addr_t src, unsigned int mask) +mroute_get_in_addr_t(struct mroute_addr *ma, const in_addr_t src) { if (ma) { - ma->type = MR_ADDR_IPV4 | mask; + ma->type = MR_ADDR_IPV4; ma->netbits = 0; ma->len = 4; ma->v4.addr = src; @@ -121,11 +116,11 @@ } static inline void -mroute_get_in6_addr(struct mroute_addr *ma, const struct in6_addr src, unsigned int mask) +mroute_get_in6_addr(struct mroute_addr *ma, const struct in6_addr src) { if (ma) { - ma->type = MR_ADDR_IPV6 | mask; + ma->type = MR_ADDR_IPV6; ma->netbits = 0; ma->len = 16; ma->v6.addr = src; @@ -161,8 +156,8 @@ { const struct openvpn_iphdr *ip = (const struct openvpn_iphdr *)BPTR(buf); - mroute_get_in_addr_t(src, ip->saddr, 0); - mroute_get_in_addr_t(dest, ip->daddr, 0); + mroute_get_in_addr_t(src, ip->saddr); + mroute_get_in_addr_t(dest, ip->daddr); /* multicast packet? */ if (mroute_is_mcast(ip->daddr)) @@ -192,8 +187,8 @@ gc_free(&gc); #endif - mroute_get_in6_addr(src, ipv6->saddr, 0); - mroute_get_in6_addr(dest, ipv6->daddr, 0); + mroute_get_in6_addr(src, ipv6->saddr); + mroute_get_in6_addr(dest, ipv6->daddr); if (mroute_is_mcast_ipv6(ipv6->daddr)) { @@ -342,7 +337,7 @@ } else { - ma->v6.addr.s6_addr[byte--] &= (IPV4_NETMASK_HOST << bits_to_clear); + ma->v6.addr.s6_addr[byte--] &= (0xFF << bits_to_clear); bits_to_clear = 0; } } @@ -552,10 +547,6 @@ } } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic pop -#endif - void mroute_helper_free(struct mroute_helper *mh) {