From patchwork Tue Aug 26 18:39:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4373 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:904b:b0:671:5a2c:6455 with SMTP id j11csp651192mac; Tue, 26 Aug 2025 11:39:59 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUwqfJwScZ69vH/WJR36yOJgQO5U4odvop1umWO1mpt2iaB0FtBvmhstQQYQGflv4emEx80cAYqD3U=@openvpn.net X-Google-Smtp-Source: AGHT+IHk0hCIsQ2uZ1XasxCtWUtCtJ/9pDh0UUIRt9U0rfXF/70N1eKX70CLCL9opChiNaMBQkb2 X-Received: by 2002:a05:6870:1b8f:b0:300:e023:e697 with SMTP id 586e51a60fabf-314dce132a9mr7823735fac.32.1756233598970; Tue, 26 Aug 2025 11:39:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1756233598; cv=none; d=google.com; s=arc-20240605; b=EY4N2HLY6gk4eK8GVOQSXmstIBPmtNS1bp27TSGQZsIxS6DQfbDoPs+OHm2+t371Ib TckCcnREqGZuzIFSD+2VSeL/wi7Xx7oaNxnpKrH9H5hdUjySWKvt2iEPNQe2y4/BDHDD hVVT18AKWOy5BocvuMHDhaBz++JCBhC2DrMY7gugjUrjNpOPWBRZVTHoKvx7ziMMdIsC hwQf2Vsj2VRL/jgeXYuvA2eqTmhTl1XvqNWh1o3fqUhvis2/hTo/GdN2QCvzMCL2x7DJ NQSWpyUT6XWYaoZquBzcdLqGD64sCU3pXelqAcSNj42QIEwR6LmcEwsPaDsakU2iXNpy X9Zg== 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=u9jC+2bY30HbOKQSM48J51TR0YLaVvsC0g/4s3MX0a0=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=P3xEYWS1u7g4MHSOYAD7+96HB8vGnxTEJ5jnJf1holvKxMPRrfdlatnJA5uh+FjvHU cPww5s1BJw7PBMAXeZRGRJ9/vxf8KrlNy3ZA9y/GZIDk9YLVoJgXpcCd92A6eRY72+G/ vExyZcbHJ5HfnG/82AfnMURdGyXOSEY4WqKulXywqKc/dkpJUd1keQcQORauuygHqdua JAjvLT0R+d7WmMTZxkOzkmO4XaH3XUgLwHaAqY+O6Miyw856HTFy0+fgTTeLP8nBYvJ2 KZy7Xk7p6PqhRrYwqI/6jLhquHr1UUSOnqXqCn7L1TJtIpNCPYrh3bbW999g6aghOl/E CFGQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=lMbHFKso; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=V3+3lmNX; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=Q0LwpZsI; 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 586e51a60fabf-314f7e00dbasi2147298fac.347.2025.08.26.11.39.58 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Aug 2025 11:39:58 -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=lMbHFKso; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=V3+3lmNX; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=Q0LwpZsI; 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=u9jC+2bY30HbOKQSM48J51TR0YLaVvsC0g/4s3MX0a0=; b=lMbHFKsovuGwbrq4686C2tWuWX aReqFEKgFjVONpIybwqt2XAjMLXL/D7bYk0Da3yZFz3o/a5MPSn878yc7OVdojXS5igwiiSUchsbR O4F5rdPpvY0Dm6AsVq1ZLUtaqT68d5RpTUwyXHHuGYjWn+/ta2ns4qtvc0ZlAd+k3g9Y=; 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 1uqyaJ-00070M-N8; Tue, 26 Aug 2025 18:39:55 +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 1uqyaI-00070F-Th for openvpn-devel@lists.sourceforge.net; Tue, 26 Aug 2025 18:39:54 +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=NuHF50xMLr1wQEiaUBcfN41vUyodalDJ4yRrwWVkcGQ=; b=V3+3lmNXLZTcqRKah8uAdIeSkF OYDDruqTvkztkZwpI5FsVzENVrsqoNCR2ztj2wqn0zgugy/C+S20RY3SysmIF/Y/UuZIXm5LphVrQ r89PQShhPMsmfZ0GKwU42QHLrkDpXnJGOp1jQhVrnEW8j8hKdqOKs94wV8Dpxcx3Sblk=; 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=NuHF50xMLr1wQEiaUBcfN41vUyodalDJ4yRrwWVkcGQ=; b=Q0LwpZsIFAEQwIRMOa89F9H4hq 1jN5RvppVGzCd/ILAAQCmeyGko/gq1Nc4LBxIY2UB9Jwj08FSJFVnFomj1Sv4ueMjzBJpVmtYDkrG 5lm3IJAiXJrOcN8m7I0MLpR/BcAm1wBBF5jeNCJoVJL6Se6qm3NymKxZyDoCTvY4qics=; 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 1uqyaI-0006eI-32 for openvpn-devel@lists.sourceforge.net; Tue, 26 Aug 2025 18:39:54 +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 57QIdgFe021358 for ; Tue, 26 Aug 2025 20:39:42 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.1/8.18.1/Submit) id 57QIdgM3021357 for openvpn-devel@lists.sourceforge.net; Tue, 26 Aug 2025 20:39:42 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Tue, 26 Aug 2025 20:39:33 +0200 Message-ID: <20250826183941.21338-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 verify_permissions already expects them to be unsigned, make sure they are to avoid spurious conversion warnings. Change-Id: I1d27cb81d32058e40147e1d6dcd12df7f6cb2b30 Signed-off-by: Frank Lichtenheld Acked-by: Arne Schwabe --- Content analysis details: (1.3 points, 5.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. [URI: openvpn.net] 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1uqyaI-0006eI-32 Subject: [Openvpn-devel] [PATCH v9] options: Make sure option types 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?1841544401900381448?= X-GMAIL-MSGID: =?utf-8?q?1841544401900381448?= From: Frank Lichtenheld verify_permissions already expects them to be unsigned, make sure they are to avoid spurious conversion warnings. Change-Id: I1d27cb81d32058e40147e1d6dcd12df7f6cb2b30 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/+/1106 This mail reflects revision 9 of this Change. Acked-by according to Gerrit (reflected above): Arne Schwabe diff --git a/src/openvpn/options.h b/src/openvpn/options.h index 5ee6e93..7dc2912 100644 --- a/src/openvpn/options.h +++ b/src/openvpn/options.h @@ -729,38 +729,38 @@ /* * Option classes. */ -#define OPT_P_GENERAL (1 << 0) -#define OPT_P_UP (1 << 1) -#define OPT_P_ROUTE (1 << 2) -#define OPT_P_DHCPDNS (1 << 3) /* includes ip windows options like */ -#define OPT_P_SCRIPT (1 << 4) -#define OPT_P_SETENV (1 << 5) -#define OPT_P_SHAPER (1 << 6) -#define OPT_P_TIMER (1 << 7) -#define OPT_P_PERSIST (1 << 8) -#define OPT_P_PERSIST_IP (1 << 9) -#define OPT_P_COMP (1 << 10) /* TODO */ -#define OPT_P_MESSAGES (1 << 11) -#define OPT_P_NCP (1 << 12) /**< Negotiable crypto parameters */ -#define OPT_P_TLS_PARMS (1 << 13) /* TODO */ -#define OPT_P_MTU (1 << 14) /* TODO */ -#define OPT_P_NICE (1 << 15) -#define OPT_P_PUSH (1 << 16) -#define OPT_P_INSTANCE (1 << 17) /**< allowed in ccd, client-connect etc*/ -#define OPT_P_CONFIG (1 << 18) -#define OPT_P_EXPLICIT_NOTIFY (1 << 19) -#define OPT_P_ECHO (1 << 20) -#define OPT_P_INHERIT (1 << 21) -#define OPT_P_ROUTE_EXTRAS (1 << 22) -#define OPT_P_PULL_MODE (1 << 23) -#define OPT_P_PLUGIN (1 << 24) -#define OPT_P_SOCKBUF (1 << 25) -#define OPT_P_SOCKFLAGS (1 << 26) -#define OPT_P_CONNECTION (1 << 27) -#define OPT_P_PEER_ID (1 << 28) -#define OPT_P_INLINE (1 << 29) -#define OPT_P_PUSH_MTU (1 << 30) -#define OPT_P_ROUTE_TABLE (1 << 31) +#define OPT_P_GENERAL (1u << 0) +#define OPT_P_UP (1u << 1) +#define OPT_P_ROUTE (1u << 2) +#define OPT_P_DHCPDNS (1u << 3) /* includes ip windows options like */ +#define OPT_P_SCRIPT (1u << 4) +#define OPT_P_SETENV (1u << 5) +#define OPT_P_SHAPER (1u << 6) +#define OPT_P_TIMER (1u << 7) +#define OPT_P_PERSIST (1u << 8) +#define OPT_P_PERSIST_IP (1u << 9) +#define OPT_P_COMP (1u << 10) /* TODO */ +#define OPT_P_MESSAGES (1u << 11) +#define OPT_P_NCP (1u << 12) /**< Negotiable crypto parameters */ +#define OPT_P_TLS_PARMS (1u << 13) /* TODO */ +#define OPT_P_MTU (1u << 14) /* TODO */ +#define OPT_P_NICE (1u << 15) +#define OPT_P_PUSH (1u << 16) +#define OPT_P_INSTANCE (1u << 17) /**< allowed in ccd, client-connect etc*/ +#define OPT_P_CONFIG (1u << 18) +#define OPT_P_EXPLICIT_NOTIFY (1u << 19) +#define OPT_P_ECHO (1u << 20) +#define OPT_P_INHERIT (1u << 21) +#define OPT_P_ROUTE_EXTRAS (1u << 22) +#define OPT_P_PULL_MODE (1u << 23) +#define OPT_P_PLUGIN (1u << 24) +#define OPT_P_SOCKBUF (1u << 25) +#define OPT_P_SOCKFLAGS (1u << 26) +#define OPT_P_CONNECTION (1u << 27) +#define OPT_P_PEER_ID (1u << 28) +#define OPT_P_INLINE (1u << 29) +#define OPT_P_PUSH_MTU (1u << 30) +#define OPT_P_ROUTE_TABLE (1u << 31) #define OPT_P_DEFAULT (~(OPT_P_INSTANCE | OPT_P_PULL_MODE)) diff --git a/src/openvpn/ssl_ncp.c b/src/openvpn/ssl_ncp.c index 5e094a2..51f7f92 100644 --- a/src/openvpn/ssl_ncp.c +++ b/src/openvpn/ssl_ncp.c @@ -307,7 +307,7 @@ } bool -check_pull_client_ncp(struct context *c, const int found) +check_pull_client_ncp(struct context *c, const unsigned int found) { if (found & OPT_P_NCP) { diff --git a/src/openvpn/ssl_ncp.h b/src/openvpn/ssl_ncp.h index 2b2ff85..ed5d281 100644 --- a/src/openvpn/ssl_ncp.h +++ b/src/openvpn/ssl_ncp.h @@ -49,7 +49,7 @@ * * @return Wether the client NCP process suceeded or failed */ -bool check_pull_client_ncp(struct context *c, int found); +bool check_pull_client_ncp(struct context *c, unsigned int found); /** * Iterates through the ciphers in server_list and return the first