From patchwork Tue Aug 26 18:38:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4372 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:904b:b0:671:5a2c:6455 with SMTP id j11csp650937mac; Tue, 26 Aug 2025 11:39:28 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUB6Ve4KM8rE6DBT7MJsfTBWixbt0OgwJ6Tk7PGBlZlaSC1qNXlmLR9nkMkhaP59z5dqTJy7lfKghA=@openvpn.net X-Google-Smtp-Source: AGHT+IEAsIqqRHPuUZ5Ql5Su/3V0KgCUctgPTcYb1mk9D4rX0fL9V8LbvHveMxsSe1fcezGRQJ5/ X-Received: by 2002:a05:6871:e70e:b0:30b:abf6:636c with SMTP id 586e51a60fabf-314dce109dbmr7535599fac.28.1756233568415; Tue, 26 Aug 2025 11:39:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1756233568; cv=none; d=google.com; s=arc-20240605; b=L41AC9vZ18jOoWVN6KaFZfgfgDenM/Um421msaxMXi+xcPf9V0hALBBqImwRd6OqmW PsHpC6NXWOYZ9otdn28k04aiR3UIJn1Junixh2ZISVpTIfJ/lx9MB+Ie7sOeAVI9dmFA Mc26zQdDcxcwRSpneU8HfNglRRReLFYkPpa+cKyydo3CAANJNF0aLZ79jSmRI8tBYa8L FrQ+BooiwBKylz96UL8ZB+NYNAuBPN1Zt+r6lBWUjSqWXzwHjLV61VHtfcLsWkofkjw8 zd0EdixcyhNMV/N53goYh/4Tj8lBkRctK4gHKkGFugas64WE09XlNMeZKXaBzQBCwA/3 QxXg== 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=APvHjjATfo7rXWhZ3OkZNR0Y4S724AehXBmFKnJsMAo=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=FJMqSTU8U30O8d3pQIV60ZLrRjrUm7WQwTWa5tAiT13MH3UgaZykQXY/RFfx286bs6 jz1bpoK5tZ9W7QBgRj9aqctt7LTXJ4Acv8MPjU58CVFfWHtxdL4q2DWqz7P25+IOmjf3 BouToeHyHZiQV9LCoV8SCGZMN69a1pauN9lxNSmpxrsB5WYzabZu96ag/Ezd1yoBngr5 O8Ra/3j72DsjneHjLkfIhigV7HneEf5FnKi8retveYsHxXUZD6GRD9yKq5N1fWoB1uh2 VjNDV4bxTnknraczjorEqTIzSLjeicEQlB1HMX9sQfmi1hk5viVGp90/HPvFmZ6vm0YS GnCw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=bNVm4ecB; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=LaZuiX+8; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=W0XNF+vt; 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 46e09a7af769-7450e4f879esi2027605a34.196.2025.08.26.11.39.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Aug 2025 11:39:27 -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=bNVm4ecB; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=LaZuiX+8; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=W0XNF+vt; 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=APvHjjATfo7rXWhZ3OkZNR0Y4S724AehXBmFKnJsMAo=; b=bNVm4ecB3CWAxUihvA+J0/WkrO opqO5dHh7Wjq74YY1/WzMtVUc502BLxmvQvZUpbncBco6usikIqvYbr7AIaWCUQJf0juEnN0OShGz KJlCfTAXImYC36qGdS0QH4Hv33slyubxqYUMPpeA9c/pA5Cckwcmm7c9BoOBxoPMJM8w=; 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 1uqyZk-00045b-8w; Tue, 26 Aug 2025 18:39:21 +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 1uqyZh-00045G-Uq for openvpn-devel@lists.sourceforge.net; Tue, 26 Aug 2025 18:39:18 +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=P99EzD8zPwYF5UZdbgWhszUtwSx1DYLq3rUHCd5TXms=; b=LaZuiX+8EcBnTRDVX+PsQmEPRv 5UbmpoHodfvxi+NX0SWeujm3gq0h2slZnjAgplXBT/Il770A4h5wUs5v5UsWg6rrwNp24qeV0VUGW PBy/tYsEgooOaGJIN1tDTRbU5R2YLIjFO9sxjod56Peae89AXDUZAyEhIGtkpeQSr1zk=; 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=P99EzD8zPwYF5UZdbgWhszUtwSx1DYLq3rUHCd5TXms=; b=W0XNF+vt0ANgkZKaxgOVSDBQ3z 5RIwBGcEGgz1vkMPjpRVL/ZOL3BDzLdwWgP9AkAj6L786058V4W7QHMkaLLpm0DX3h/bSh1EWZ1q4 QIiS6wrcMF3gYFVioGhmN+QSmAngX7oJk61zYRe1rdc+YjLIjQ3UjC7CGoJgBlJZ7OZk=; 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 1uqyZh-0006b8-Kc for openvpn-devel@lists.sourceforge.net; Tue, 26 Aug 2025 18:39:18 +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 57QId5CD021302 for ; Tue, 26 Aug 2025 20:39:05 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.1/8.18.1/Submit) id 57QId59E021301 for openvpn-devel@lists.sourceforge.net; Tue, 26 Aug 2025 20:39:05 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Tue, 26 Aug 2025 20:38:41 +0200 Message-ID: <20250826183902.21252-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-2.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 The variables that hold them are already unsigned, make sure the flags are as well to avoid spurious conversion warnings. Change-Id: Ib7f78abbcd52c00a32afdea36ef635681ac8e127 Signed-off-by: Frank Lichtenheld Acked-by: Arne Schwabe --- 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: 1uqyZh-0006b8-Kc Subject: [Openvpn-devel] [PATCH v9] route: Make sure various route flags are treated as unsigned 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?1841544370271326902?= X-GMAIL-MSGID: =?utf-8?q?1841544370271326902?= From: Frank Lichtenheld The variables that hold them are already unsigned, make sure the flags are as well to avoid spurious conversion warnings. Change-Id: Ib7f78abbcd52c00a32afdea36ef635681ac8e127 Signed-off-by: Frank Lichtenheld Acked-by: Arne Schwabe --- 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/+/1109 This mail reflects revision 9 of this Change. Acked-by according to Gerrit (reflected above): Arne Schwabe diff --git a/src/openvpn/route.h b/src/openvpn/route.h index ea8b767..9b6a47e 100644 --- a/src/openvpn/route.h +++ b/src/openvpn/route.h @@ -83,14 +83,14 @@ }; /* redirect-gateway flags */ -#define RG_ENABLE (1 << 0) -#define RG_LOCAL (1 << 1) -#define RG_DEF1 (1 << 2) -#define RG_BYPASS_DHCP (1 << 3) -#define RG_BYPASS_DNS (1 << 4) -#define RG_REROUTE_GW (1 << 5) -#define RG_AUTO_LOCAL (1 << 6) -#define RG_BLOCK_LOCAL (1 << 7) +#define RG_ENABLE (1u << 0) +#define RG_LOCAL (1u << 1) +#define RG_DEF1 (1u << 2) +#define RG_BYPASS_DHCP (1u << 3) +#define RG_BYPASS_DNS (1u << 4) +#define RG_REROUTE_GW (1u << 5) +#define RG_AUTO_LOCAL (1u << 6) +#define RG_BLOCK_LOCAL (1u << 7) struct route_option_list { @@ -117,9 +117,9 @@ struct route_ipv4 { -#define RT_DEFINED (1 << 0) -#define RT_ADDED (1 << 1) -#define RT_METRIC_DEFINED (1 << 2) +#define RT_DEFINED (1u << 0) +#define RT_ADDED (1u << 1) +#define RT_METRIC_DEFINED (1u << 2) struct route_ipv4 *next; unsigned int flags; const struct route_option *option; @@ -227,9 +227,9 @@ struct route_list { -#define RL_DID_REDIRECT_DEFAULT_GATEWAY (1 << 0) -#define RL_DID_LOCAL (1 << 1) -#define RL_ROUTES_ADDED (1 << 2) +#define RL_DID_REDIRECT_DEFAULT_GATEWAY (1u << 0) +#define RL_DID_LOCAL (1u << 1) +#define RL_ROUTES_ADDED (1u << 2) unsigned int iflags; struct route_special_addr spec;