From patchwork Fri Feb 3 19:14:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lichtenheld X-Patchwork-Id: 3040 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:c95:b0:82:e4b3:40a0 with SMTP id p21csp1375690dyk; Fri, 3 Feb 2023 11:15:21 -0800 (PST) X-Google-Smtp-Source: AK7set8rt7sePDufMq8Q3Ma6Ds0kR7kmHWKVgfACO1svn5eXdkt2CvVmbVtkblwkkL59GsuveEyf X-Received: by 2002:a05:6a20:1603:b0:bc:2665:cbe6 with SMTP id l3-20020a056a20160300b000bc2665cbe6mr14339609pzj.5.1675451721346; Fri, 03 Feb 2023 11:15:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675451721; cv=none; d=google.com; s=arc-20160816; b=Rgi/wWPhUAqoyq+E7OmXED37Scp2Kf79DmdmObGgZc6Nrs2AocoMuABIMPa+Mlc8HE 6TJnlIDPM01HN2oMQwaDAPYv7gotwXe4LK86pD7cKNcC4mLcQj4r5gUDyH7exckiDyQq ci6xaO3prMUBluE/suu4o684bThCpoKENvvipbN0mJXvsEIq6r5xDgCEQnXZtGwpERdx Eks9j1MHwJrgwBQ9VdA+R4wWTqpWDSpFmVBqj9f6eaFD2gW4AWWC3SNv3ZKo3+lfbXYs nNsiUsygACu8ZlM8EQaYg5KVhZu1JDFltd4xf+SF0olA+8jSHtHP4PSV6XEgplzCMZjE u+cQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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; bh=r1ra1mcMTHzH48aT4b3aXgsCo/KQwNk/BH7y3CfTh+U=; b=eXn1md3+W0s/rRXE5jW3IFtl1R6o/YefqcWLLhAZDxK5NNCQ4Y0tb4kYbkCwUgJR7+ RM8so6gVYRJY3CPwdf6y5F76zm25XqeLZ4182h4V0nV0xOnrg1ccq6knuXA9t9LRF1xU dK/BPGgyCeaX9FZF80j3uP1EBxMg+H/0D+tBSylfEpqHd//CWIq4ZSn18j1xc12IqrTe XAplOrLhWYglHaZe0Ez5/uMJHgWBZc81hfQX7LFow2AhNyXPsdalLx6YHFRDjSSvG8tg pjlZJGndppRTaa8Go/Jvg4FC8zF2TF2JYrUjRmvpu/GbToYOMsK5Bbyeeajd1nWzyFtd Pzww== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=N5x5bCsT; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=fKL82b2s; 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 Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id d19-20020a637353000000b004f23305262bsi3610876pgn.14.2023.02.03.11.15.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Feb 2023 11:15:21 -0800 (PST) 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=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=N5x5bCsT; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=fKL82b2s; 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 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 1pO1WT-0005QX-6N; Fri, 03 Feb 2023 19:14:56 +0000 Received: from [172.30.20.202] (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 1pO1WS-0005QR-3O for openvpn-devel@lists.sourceforge.net; Fri, 03 Feb 2023 19:14:55 +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=NmQPHVIJBY5xpLPUhShwQJooj52AL5qwTljbBDoZs8c=; b=N5x5bCsTljufZ7gGC3LGogMOkp Xx95oN5ZizE9vwmZqnVCS6WPUiG70PL6pXvrnkXwnbgfJbvy7IomX1UUrnv7Q+0Gpy3Bm95lyHUTR r5ydRP8WZQtdfvXCz8cteA6lpJz+5gJMvfhQ4LBOySbV5tglfIDdYIa+4mHBs02JIo+M=; 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=NmQPHVIJBY5xpLPUhShwQJooj52AL5qwTljbBDoZs8c=; b=fKL82b2sKVsXzz0z97Cr9lqASv WgFL2QWIb8t4zg758UTNFrgbhG01sACKExNykYNXUJ/O7VTyDA3ExsqSnpjh8e8ZA/c74/++vJaU2 FZpDhNHodaUqbI9HFtFGhaK1FNc7kqAvcNyq5s9bo7hdVarOg/l635kPkJUWh77rlJp8=; Received: from mout-p-102.mailbox.org ([80.241.56.152]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1pO1WP-000159-9R for openvpn-devel@lists.sourceforge.net; Fri, 03 Feb 2023 19:14:55 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4P7lhf1qQMz9stP for ; Fri, 3 Feb 2023 20:14:42 +0100 (CET) From: Frank Lichtenheld To: openvpn-devel@lists.sourceforge.net Date: Fri, 3 Feb 2023 20:14:36 +0100 Message-Id: <20230203191440.136050-2-frank@lichtenheld.com> In-Reply-To: <20230203191440.136050-1-frank@lichtenheld.com> References: <20230203191440.136050-1-frank@lichtenheld.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4P7lhf1qQMz9stP X-Spam-Score: -0.7 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-1.v13.lw.sourceforge.com", 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: Signed-off-by: Frank Lichtenheld --- src/openvpn/options.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 6ae3faf8..ab1b01cf 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -1041,6 +1041,7 @@ setenv_settings(struct env_set [...] Content analysis details: (-0.7 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [80.241.56.152 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record X-Headers-End: 1pO1WP-000159-9R Subject: [Openvpn-devel] [PATCH 1/5] Windows: fix unused function setenv_foreign_option 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?1756838464183119352?= X-GMAIL-MSGID: =?utf-8?q?1756838464183119352?= Signed-off-by: Frank Lichtenheld Acked-by: Lev Stipakov --- src/openvpn/options.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 6ae3faf8..ab1b01cf 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -1041,6 +1041,7 @@ setenv_settings(struct env_set *es, const struct options *o) } } +#ifndef _WIN32 static void setenv_foreign_option(struct options *o, const char *argv[], int len, struct env_set *es) { @@ -1078,6 +1079,7 @@ setenv_foreign_option(struct options *o, const char *argv[], int len, struct env gc_free(&gc); } } +#endif /* ifndef _WIN32 */ static in_addr_t get_ip_addr(const char *ip_string, int msglevel, bool *error) From patchwork Fri Feb 3 19:14:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lichtenheld X-Patchwork-Id: 3044 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:c95:b0:82:e4b3:40a0 with SMTP id p21csp1375973dyk; Fri, 3 Feb 2023 11:15:47 -0800 (PST) X-Google-Smtp-Source: AK7set/ZTjJYJZSgx0Fh5cv6ap64IDfj5PSmC68zRfwCRzFpq2Lo9/Q0nydCiCuHfLRP9u08/R5J X-Received: by 2002:a17:90b:38cc:b0:22c:61c:2d5b with SMTP id nn12-20020a17090b38cc00b0022c061c2d5bmr11923754pjb.20.1675451746964; Fri, 03 Feb 2023 11:15:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675451746; cv=none; d=google.com; s=arc-20160816; b=yVMp/n65tWORreEP7pJOdsuAgSXoDEkgolAFO54durx0XyAlcvlOdMavx3ne0ob7cj rIhMEoVoA1hpJfU0QpONbM6Z0t3fEUEbkzBpezi39loApKG6bMPsblluop1ees0Mm3fg 68lnhrG29W3ypSEiKo62oPn32Irs0LLnb+/BBBlpEhRGGLgH/hrgMS0t/ZI/6jwbOb56 kkm1ALKl2lJkj/fLB6e3DCp182zEt8A9CqkZuEvoFkATFau3kEyRWs88CEKEaP98vxRj s/jurHBtn6QDvxqaaHjaQRSiFF9VKLvBNPAgeVmeWMNwGFJGOoraAm9ql6tYzUe+OWpd sbbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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; bh=PnojtCagxZbO4dg3q8xaZYobkf1RmMrQ0YT2eKPTjng=; b=czSPRwqoJauQFCngfR/uv1Y8u1X3Ema4vLb7mogPhyq9v8g1qzw1aMIqJez1fw6VTo ztqR93S/MdVQFkW6H4SGEe2/64FrqHVU2CtXAeKvHxbLP8AKdH+o0W8Iiqs2MIr/dLpQ ajI1NKGyfXagtblvvQEmyCtrCkA3+rgpjpNvgjy2k/a6Y41PIiDiSoiY7IC1MMIs1OUL wy7P3oaW3/LLOd771cWValeKJcVWfCECjY3AgX7sJoLMqlX3S6tNobbXklL9gpmQDgeK QGegWa+P/DfyZk/B/5+gTaLXyapq0Tq2Gnv7QONGidjIk0v6pLKhHm3ZuQggiZROGa4/ lw4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=lv++4KZ5; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=LrqgloAq; 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 Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id d19-20020a17090ad3d300b0022c4ddf8413si8245299pjw.8.2023.02.03.11.15.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Feb 2023 11:15:46 -0800 (PST) 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=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=lv++4KZ5; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=LrqgloAq; 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 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 1pO1WZ-0004rM-K4; Fri, 03 Feb 2023 19:15:02 +0000 Received: from [172.30.20.202] (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 1pO1WU-0004qs-VO for openvpn-devel@lists.sourceforge.net; Fri, 03 Feb 2023 19:14:57 +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=Fkh59I6YnYXnfK5zlrVFF9B0jPZE1n6NUcy5xsTwwqc=; b=lv++4KZ5W5ColuUNQ6sdiFuDk7 mgIYu807jlQaNkvQLgGMw0rCfk4fQeSRu85hQVzOBmvx3xwq0Zo+e6eJjJfakkawslnWCSzFx/ynu ANhWzA4LVt9FFDge6j6l5SmDsDeVhbdVVLbTT56pXylAwRpV/451qbSQ/3be3hDz/Uy8=; 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=Fkh59I6YnYXnfK5zlrVFF9B0jPZE1n6NUcy5xsTwwqc=; b=LrqgloAq3Kwp73paBVQazVd09c ZLR4AJFyngwJ4iVioMKFZQo6Qz1eu+/Ghuix6nTr42m74DgbSRTBG9/P9xgr030+R3Q7P+Q2WalYh Ixr9v434X9CsUEw15sG3UKVdBTcvFRFeQ2EU0fYMUUrTCaixqdEoGkjiPgp/oC/6XGNM=; Received: from mout-p-202.mailbox.org ([80.241.56.172]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1pO1WS-00AMfa-I9 for openvpn-devel@lists.sourceforge.net; Fri, 03 Feb 2023 19:14:57 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4P7lhf5Wxhz9sxf for ; Fri, 3 Feb 2023 20:14:42 +0100 (CET) From: Frank Lichtenheld To: openvpn-devel@lists.sourceforge.net Date: Fri, 3 Feb 2023 20:14:37 +0100 Message-Id: <20230203191440.136050-3-frank@lichtenheld.com> In-Reply-To: <20230203191440.136050-1-frank@lichtenheld.com> References: <20230203191440.136050-1-frank@lichtenheld.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4P7lhf5Wxhz9sxf X-Spam-Score: -0.7 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-1.v13.lw.sourceforge.com", 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: At this point it might be easier to create a dedicated function for Windows... Signed-off-by: Frank Lichtenheld --- src/openvpn/route.c | 32 ++++++++++++++++ 1 file changed, 16 insertions(+), 16 deletions(-) Content analysis details: (-0.7 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [80.241.56.172 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record X-Headers-End: 1pO1WS-00AMfa-I9 Subject: [Openvpn-devel] [PATCH 2/5] Windows: fix unused variables in delete_route_ipv6 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?1756838491123133326?= X-GMAIL-MSGID: =?utf-8?q?1756838491123133326?= At this point it might be easier to create a dedicated function for Windows... Signed-off-by: Frank Lichtenheld Acked-by: Lev Stipakov --- src/openvpn/route.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/openvpn/route.c b/src/openvpn/route.c index 82519c94..3798bc65 100644 --- a/src/openvpn/route.c +++ b/src/openvpn/route.c @@ -2333,12 +2333,6 @@ delete_route_ipv6(const struct route_ipv6 *r6, const struct tuntap *tt, openvpn_net_ctx_t *ctx) { const char *network; -#if !defined(TARGET_LINUX) - const char *gateway; -#else - int metric; -#endif - bool gateway_needed = false; if ((r6->flags & (RT_DEFINED|RT_ADDED)) != (RT_DEFINED|RT_ADDED)) { @@ -2346,19 +2340,34 @@ delete_route_ipv6(const struct route_ipv6 *r6, const struct tuntap *tt, } #ifndef _WIN32 +#if !defined(TARGET_LINUX) + const char *gateway; +#else + int metric; +#endif + bool gateway_needed = false; const char *device = tt->actual_name; if (r6->iface != NULL) /* vpn server special route */ { device = r6->iface; gateway_needed = true; } + + /* if we used a gateway on "add route", we also need to specify it on + * delete, otherwise some OSes will refuse to delete the route + */ + if (tt->type == DEV_TYPE_TAP + && !( (r6->flags & RT_METRIC_DEFINED) && r6->metric == 0 ) ) + { + gateway_needed = true; + } #endif struct gc_arena gc = gc_new(); struct argv argv = argv_new(); network = print_in6_addr( r6->network, 0, &gc); -#if !defined(TARGET_LINUX) +#if !defined(TARGET_LINUX) && !defined(_WIN32) gateway = print_in6_addr( r6->gateway, 0, &gc); #endif @@ -2382,15 +2391,6 @@ delete_route_ipv6(const struct route_ipv6 *r6, const struct tuntap *tt, msg( M_INFO, "delete_route_ipv6(%s/%d)", network, r6->netbits ); - /* if we used a gateway on "add route", we also need to specify it on - * delete, otherwise some OSes will refuse to delete the route - */ - if (tt->type == DEV_TYPE_TAP - && !( (r6->flags & RT_METRIC_DEFINED) && r6->metric == 0 ) ) - { - gateway_needed = true; - } - #if defined(TARGET_LINUX) metric = -1; if ((r6->flags & RT_METRIC_DEFINED) && (r6->metric > 0)) From patchwork Fri Feb 3 19:14:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lichtenheld X-Patchwork-Id: 3043 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:c95:b0:82:e4b3:40a0 with SMTP id p21csp1375693dyk; Fri, 3 Feb 2023 11:15:21 -0800 (PST) X-Google-Smtp-Source: AK7set+FYCR1u2YWyEARKTD/n9DedJqN8+mLQiY+RbTIlVQTl70eu70Tl0chU31NDs6P5ZfQzcQH X-Received: by 2002:a17:903:246:b0:198:a715:d26d with SMTP id j6-20020a170903024600b00198a715d26dmr13592462plh.8.1675451721595; Fri, 03 Feb 2023 11:15:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675451721; cv=none; d=google.com; s=arc-20160816; b=OSIoyZTbT2Yv09MBNQ9h5F4wL1nhwUZ9xf5d6eXwaQk0LhVfj4NpdfTqi3EwhlfwUE DTenIRSZNS3UvLEYot67Iu/SZm63+CCZYFmnb/fq4F0B2gEW+vCNSuTAFAy+uMYzyo/p KFLaMp3xDjSb/t8Ni/0CQ3tb9NBF1aY+CIsQar6072N7bOWcyXpUAuaFZDARPzsgJ1m9 YDRqoBnUq8L8Yti8QaP2w8ufZu/DDH1uq/57E7oBgZrdBA+YstzOEkXvA+r16WweXJ6i IJYZW01z6wA6eIuEeL35FV8uZTpEThmvMv0WakWCh3oHNZle5XfEIR5MEagZGw5Nz3vf N29Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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; bh=AG3I1lcOV7WcaUfYhJUTWoPmXIs7GEFhq1fRnsIOlKE=; b=EsTK8EngyD2HbvVaSpu5Z9B6M2jfttv9uQT48sj7q2LJ64S8xBrfsc8OCeUNGNEbVx wukpEFjMV6cQGfqFC68TxQKM4HX1PcdCcfsRQQIMBXD0tE+3L5dn8+rxMQqtoJCJkJ0C qBxROU5XUEJ0bU8aiSX/GwHnfWESEVLwEFp9IPmbbhCpv00d9tmSrBOdI+DHV0BUKikX 6NtM/SzgPo34z5dxJsF2xC0/H0maMJposxl+Y0aSdnU+qSrSD270G36GL1yGnTX6iqXU sNvQvZEpUDfgTuxUfIreqDNYni773E3fujurr9jUnEbtaoY2nohzaMgS7IHynngpdI3m KpUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=HvaAMoIg; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=X2dInAb2; 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 Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id k18-20020a170902761200b00198ee9e1397si230318pll.406.2023.02.03.11.15.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Feb 2023 11:15:21 -0800 (PST) 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=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=HvaAMoIg; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=X2dInAb2; 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 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 1pO1WY-0007r4-7n; Fri, 03 Feb 2023 19:15:01 +0000 Received: from [172.30.20.202] (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 1pO1WW-0007qr-CT for openvpn-devel@lists.sourceforge.net; Fri, 03 Feb 2023 19:14:59 +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=LVekO2S9gaNwk+swxuHxAqHZg2PE85anb7FMe9ipl7E=; b=HvaAMoIgeZUg1qVuUkZ8BZ/+bW Q26HwTBU74tkorcEauS1dITF57mgzpTV59fxTbgqcrb9XDiRQ7k91DuwgDbxjbYMC8IXWUVI8wz3C gW7rGogTwBsQ5VClqsPI6HoXzA4L0d6/SzZPz8+40l8KqrFg3lIi1Cpq2UMhskDapGyE=; 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=LVekO2S9gaNwk+swxuHxAqHZg2PE85anb7FMe9ipl7E=; b=X2dInAb2+Xhf0MmUUlukTD9YSj c4bJUkqEGB1f7mN2HEVVZLRm/39m5G3PNejoXnxrkR+aEm/pKU1PIQhmPQIK+KKtHtdjl4cxW954W BBkXeuob4yeNKPnVCwtNFHOMXFeK2eUnB9CyphA9jtPvco3Sri7ZVKDkqbfO35rPrmJA=; Received: from mout-p-102.mailbox.org ([80.241.56.152]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1pO1WP-00015A-9P for openvpn-devel@lists.sourceforge.net; Fri, 03 Feb 2023 19:14:59 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4P7lhg1d36z9swr for ; Fri, 3 Feb 2023 20:14:43 +0100 (CET) From: Frank Lichtenheld To: openvpn-devel@lists.sourceforge.net Date: Fri, 3 Feb 2023 20:14:38 +0100 Message-Id: <20230203191440.136050-4-frank@lichtenheld.com> In-Reply-To: <20230203191440.136050-1-frank@lichtenheld.com> References: <20230203191440.136050-1-frank@lichtenheld.com> MIME-Version: 1.0 X-Spam-Score: -0.7 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-2.v13.lw.sourceforge.com", 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: Signed-off-by: Frank Lichtenheld --- src/openvpn/error.c | 4 ++-- src/openvpn/syshead.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/openvpn/error.c b/src/openvpn/error.c index 89a08cec..a2c9aa4c 100644 --- a/src/openvpn/error.c +++ b/src/openvpn/error.c @@ -695,14 +695,14 @@ x_check_status(int status, { if (extend [...] Content analysis details: (-0.7 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [80.241.56.152 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record X-Headers-End: 1pO1WP-00015A-9P Subject: [Openvpn-devel] [PATCH 3/5] Windows: fix wrong printf format in x_check_status 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?1756838464263155759?= X-GMAIL-MSGID: =?utf-8?q?1756838464263155759?= Signed-off-by: Frank Lichtenheld --- src/openvpn/error.c | 4 ++-- src/openvpn/syshead.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/openvpn/error.c b/src/openvpn/error.c index 89a08cec..a2c9aa4c 100644 --- a/src/openvpn/error.c +++ b/src/openvpn/error.c @@ -695,14 +695,14 @@ x_check_status(int status, { if (extended_msg) { - msg(x_cs_info_level, "%s %s [%s]: %s (fd=%d,code=%d)", description, + msg(x_cs_info_level, "%s %s [%s]: %s (fd=" SOCKET_PRINTF ",code=%d)", description, sock ? proto2ascii(sock->info.proto, sock->info.af, true) : "", extended_msg, openvpn_strerror(my_errno, crt_error, &gc), sock ? sock->sd : -1, my_errno); } else { - msg(x_cs_info_level, "%s %s: %s (fd=%d,code=%d)", description, + msg(x_cs_info_level, "%s %s: %s (fd=" SOCKET_PRINTF ",code=%d)", description, sock ? proto2ascii(sock->info.proto, sock->info.af, true) : "", openvpn_strerror(my_errno, crt_error, &gc), sock ? sock->sd : -1, my_errno); diff --git a/src/openvpn/syshead.h b/src/openvpn/syshead.h index fe91bc11..58cdd6bd 100644 --- a/src/openvpn/syshead.h +++ b/src/openvpn/syshead.h @@ -442,9 +442,11 @@ typedef unsigned short sa_family_t; */ #ifdef _WIN32 #define SOCKET_UNDEFINED (INVALID_SOCKET) +#define SOCKET_PRINTF "%lld" typedef SOCKET socket_descriptor_t; #else #define SOCKET_UNDEFINED (-1) +#define SOCKET_PRINTF "%d" typedef int socket_descriptor_t; #endif From patchwork Fri Feb 3 19:14:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lichtenheld X-Patchwork-Id: 3041 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:c95:b0:82:e4b3:40a0 with SMTP id p21csp1375692dyk; Fri, 3 Feb 2023 11:15:21 -0800 (PST) X-Google-Smtp-Source: AK7set+6aODukfq759emFwdzKvteO5NYMfHIAps81YIWiRWep/vSsPojL+0Ew6d1VOv6IYwY9rJf X-Received: by 2002:a17:902:d103:b0:198:db5c:d296 with SMTP id w3-20020a170902d10300b00198db5cd296mr3056108plw.64.1675451721563; Fri, 03 Feb 2023 11:15:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675451721; cv=none; d=google.com; s=arc-20160816; b=xyByxv8qRsdz/+xLR56jYAjnOQ6ne7qGN2WWWBkjQueyUO2J0NFkH+YIg6PMupi+Hb i+C3z7oEaGNroKua9IQbUT11nfwo0qhE+LlhLRwNce1BnD7oZyW4wGoEnQk4lJNNDoRg +s+NChYzBinVffbwVC3RaF6jlzN6Y+8DJLZmzKCE4lIqUq0sDqN45YsgiP5ths/A28S5 KqC4rh+TY/OHMpBrKWfZpoXgR2XzJO9bPzf4mgLzliyVL4fIP35tcJVm9kalmhgP3HK2 acNi3iZox+22yuYsl1a2f7lzYSwNLHnA84jJR0U0kqYZoz9SxI4+UlulcDKt7EaPZVqA GAtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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; bh=EKuFXwEmT3xaAo3osg+D40pSvuSc2GbjChR8mxZKViU=; b=Z57AE9tD6rv5B6yxW2UcD1xMnU4xVJMWi93Wn1DtBo+mI+ST091RbyqZNDzbBy0Y7K Y1q2M1j3eJIIvcFqzMgxdDsNd2GkcfEIQe0vWGo8UJQL/s4GdiJCgfBtWeX1h52XLUaB SDsHMGgXhZJfieoTUUjjWZ4NnSOWCV4Go8W6I5iCoEkGJ0hyRIA44oFmtGBC5sYj/psP r9uwYSMoIpKzunRo1PYnBcNGtYVphQ44FcocLd20nnLv6saaF5lnK4pG0DBckI0+RQY6 o8iYL1cfjuTuyi4mrZ969l8i6/E/pCHSjwSBiTqarDnXqr6KSKHN2APT5b/44sRlgAas DEQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=M1AkjbVJ; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=Jis6dekS; 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 Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id j4-20020a170902da8400b00174c5fdc8d2si3578127plx.307.2023.02.03.11.15.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Feb 2023 11:15:21 -0800 (PST) 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=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=M1AkjbVJ; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=Jis6dekS; 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 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 1pO1WW-0005Qx-Tp; Fri, 03 Feb 2023 19:15:00 +0000 Received: from [172.30.20.202] (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 1pO1WU-0005Qk-Qh for openvpn-devel@lists.sourceforge.net; Fri, 03 Feb 2023 19:14:58 +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=ZVqZjP8iwtCwZG6AQRfPCo05N4tJvnyBT/O9m9Nx4Dg=; b=M1AkjbVJMLHh6CaokMsQISgfOF TVGU37+APHZJM6wyNHrFPlexpiejok/ELmdwS+5xIqX7Qt3bqG6teVMvJv8H4lseF0Ug8cArY6/07 nlvFDXfuwHIxLYOZQBiaaR8YFakYL1fAfEeoIT8BhnaxG7xt/5lU1K6FhwrwGYrauR1M=; 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=ZVqZjP8iwtCwZG6AQRfPCo05N4tJvnyBT/O9m9Nx4Dg=; b=Jis6dekSrxKWi9tCG9cAC2+AE4 pLiFk5jcL/sadrM92f3vDsz/0SaJPDlD5yAm6r4xHefYqSMi95YXFQPtgXpSY4bxcXZlnq5iWw+2F RScLgz8ODQttfRWYgGwXDDnSa2xu5/v/pRq+4VU7q9emt6m3VGjcRX7u7l0gtVJkMMY8=; Received: from mout-p-202.mailbox.org ([80.241.56.172]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1pO1WP-00015D-0O for openvpn-devel@lists.sourceforge.net; Fri, 03 Feb 2023 19:14:58 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4P7lhj3ZR4z9sZg for ; Fri, 3 Feb 2023 20:14:45 +0100 (CET) From: Frank Lichtenheld To: openvpn-devel@lists.sourceforge.net Date: Fri, 3 Feb 2023 20:14:39 +0100 Message-Id: <20230203191440.136050-5-frank@lichtenheld.com> In-Reply-To: <20230203191440.136050-1-frank@lichtenheld.com> References: <20230203191440.136050-1-frank@lichtenheld.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4P7lhj3ZR4z9sZg X-Spam-Score: -0.7 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-2.v13.lw.sourceforge.com", 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: Signed-off-by: Frank Lichtenheld --- src/openvpn/win32.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/openvpn/win32.c b/src/openvpn/win32.c index 44176936..ad3d9bf6 100644 --- a/src/openvpn/win32.c +++ b/src/openvpn/win32.c @@ -1358, 7 +1358, 6 @@ win32_get_arch(arch_t *process_arch, ar [...] Content analysis details: (-0.7 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [80.241.56.172 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record X-Headers-End: 1pO1WP-00015D-0O Subject: [Openvpn-devel] [PATCH 4/5] Windows: fix unused variable in win32_get_arch 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?1756838464492388359?= X-GMAIL-MSGID: =?utf-8?q?1756838464492388359?= Signed-off-by: Frank Lichtenheld Acked-by: Lev Stipakov --- src/openvpn/win32.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/openvpn/win32.c b/src/openvpn/win32.c index 44176936..ad3d9bf6 100644 --- a/src/openvpn/win32.c +++ b/src/openvpn/win32.c @@ -1358,7 +1358,6 @@ win32_get_arch(arch_t *process_arch, arch_t *host_arch) USHORT process_machine = 0; USHORT native_machine = 0; - BOOL is_wow64 = FALSE; #ifdef _ARM64_ *process_arch = ARCH_ARM64; @@ -1380,8 +1379,8 @@ win32_get_arch(arch_t *process_arch, arch_t *host_arch) if (is_wow64_process2) { /* check if we're running on arm64 or amd64 machine */ - is_wow64 = is_wow64_process2(GetCurrentProcess(), - &process_machine, &native_machine); + BOOL is_wow64 = is_wow64_process2(GetCurrentProcess(), + &process_machine, &native_machine); if (is_wow64) { switch (native_machine) @@ -1403,7 +1402,7 @@ win32_get_arch(arch_t *process_arch, arch_t *host_arch) else { BOOL w64 = FALSE; - is_wow64 = IsWow64Process(GetCurrentProcess(), &w64) && w64; + BOOL is_wow64 = IsWow64Process(GetCurrentProcess(), &w64) && w64; if (is_wow64) { /* we are unable to differentiate between arm64 and amd64 From patchwork Fri Feb 3 19:14:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lichtenheld X-Patchwork-Id: 3042 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:c95:b0:82:e4b3:40a0 with SMTP id p21csp1375694dyk; Fri, 3 Feb 2023 11:15:21 -0800 (PST) X-Google-Smtp-Source: AK7set8lBhSsYYFxhPdAE2fDqGGHJbB2mEhyba4BbvBA85qG0uNJoWvUQf2Ka0a/OXiCj10AA/F7 X-Received: by 2002:a17:90a:1943:b0:22c:9078:17f with SMTP id 3-20020a17090a194300b0022c9078017fmr11468706pjh.48.1675451721603; Fri, 03 Feb 2023 11:15:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675451721; cv=none; d=google.com; s=arc-20160816; b=tg5ZIbSdX1CxiP4Ahj28OT84gJ/CHo5/+C2Mu1Ty/kKM3GY40tQ3YpJRgsw1oEIZbY C6lr5+z6Il9jKSwPtVD9r9gPWA42k/4la+WK09iu4WBAvsfjo02ct+3jdwOMIpOTQ4w5 ud8MK6vxZa35ezsLK6EzBxlA80+P3SGubyHNGAhowlZcS8Z8Isy5Vmi+v7PvKJdrAvlE qEQc6/Twfg0a76rt+o94R7DkSiYO8cqxt3o744QzWB6pHPtva3TTQ308PbO9j+Dz5Mj3 lZzX5Zp36gz5e8C4g8O83OVcPjO4qu/mxVXxY1eNHqD6fC7DVDk7xxRmxlVAsj1ae0M0 Aaig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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; bh=NMu0s2H2jQQ0wsY6ybjW3Le1eM8EpPrS4XxNgpOV7To=; b=Rzl4JMhbt5kteNS3JVqrWbgkUzCQ+aYIkRh9Evlok1otdQjadsgA6lUbJWNXWL8Mye 33PR1dWt6SrVA/JzLgTKWSuBBhGBQDUnkMDA7gY3lyYxJA9jXCweK6mcK+PBMlEw5k7a qJNndXpxvQoFsPOmAo7uJLsKfL6FII0/GF4WWP84QiwdnHUqly/qRvwxwTqzBn3MsRnL 8Qs4+YRBacuWfVlsItpvObQ52eLoQtudApoyaDyWV6v+R1pH3+I9kGYbmuXGkl1nhaos SENC1sonwbKK3aSsS2H//Ud73urIUg8x4X15ZN7B6HYFX6PDWB9/KjUh+ECCUslg3HGi se5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=O8eRJQSa; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=jXlBF83S; 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 Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id y5-20020a17090aa40500b0022c67694b0asi8315869pjp.186.2023.02.03.11.15.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Feb 2023 11:15:21 -0800 (PST) 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=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=O8eRJQSa; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=jXlBF83S; 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 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 1pO1WZ-0004rV-Tu; Fri, 03 Feb 2023 19:15:02 +0000 Received: from [172.30.20.202] (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 1pO1WY-0004rE-Vd for openvpn-devel@lists.sourceforge.net; Fri, 03 Feb 2023 19:15:01 +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=sG2IJWOusmkCoo0DTWGRH24sdNqLNmKDOObYSjUs+gE=; b=O8eRJQSaq1gnn8lOADi0rXliYO aHq8Z09FwcLMrDGGlz5zeQu1/PEdDkN/pdKxqRCcWSSovAFia9TT7AI+vKvWjCF9f3dpmuvtsiwwj hnJWWalDKWKyQ0JBnDcb3SlX3yFjNd6wZALVdR4m9hLAGx7xkpcp5lapsmJffib+IjWA=; 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=sG2IJWOusmkCoo0DTWGRH24sdNqLNmKDOObYSjUs+gE=; b=jXlBF83S2S6eODClS2G6HTH2db ToKTEUURNH6M6JKZk2b/JLSieK4nYseE0vr7Edt6xC0pXNPZBFXbiQyWi5oym+d0YGETFkdXjkbqM D4ulTvS2lmuytEWh6xszA2GLfgE5xv37LbSo8OuQ9uUngQRN2165ojsKvGQCDp/cIR00=; Received: from mout-p-103.mailbox.org ([80.241.56.161]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1pO1WS-00AMfc-Rb for openvpn-devel@lists.sourceforge.net; Fri, 03 Feb 2023 19:15:01 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4P7lhj6nJQz9t1K for ; Fri, 3 Feb 2023 20:14:45 +0100 (CET) From: Frank Lichtenheld To: openvpn-devel@lists.sourceforge.net Date: Fri, 3 Feb 2023 20:14:40 +0100 Message-Id: <20230203191440.136050-6-frank@lichtenheld.com> In-Reply-To: <20230203191440.136050-1-frank@lichtenheld.com> References: <20230203191440.136050-1-frank@lichtenheld.com> MIME-Version: 1.0 X-Spam-Score: -0.7 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-1.v13.lw.sourceforge.com", 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: On Linux those functions actually take void pointer, so no behavior change there. On Windows, we avoid warnings about unsigned char vs char. Signed-off-by: Frank Lichtenheld --- src/openvpn/manage.c | 4 ++-- src/openvpn/proxy.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) Content analysis details: (-0.7 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [80.241.56.161 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record X-Headers-End: 1pO1WS-00AMfc-Rb Subject: [Openvpn-devel] [PATCH 5/5] Windows: fix signedness errors with recv/send 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?1756838464478001070?= X-GMAIL-MSGID: =?utf-8?q?1756838464478001070?= On Linux those functions actually take void pointer, so no behavior change there. On Windows, we avoid warnings about unsigned char vs char. Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering --- src/openvpn/manage.c | 4 ++-- src/openvpn/proxy.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/openvpn/manage.c b/src/openvpn/manage.c index 8397d3cf..3ea1992b 100644 --- a/src/openvpn/manage.c +++ b/src/openvpn/manage.c @@ -2251,7 +2251,7 @@ man_read(struct management *man) man->connection.lastfdreceived = fd; } #else /* ifdef TARGET_ANDROID */ - len = recv(man->connection.sd_cli, buf, sizeof(buf), MSG_NOSIGNAL); + len = recv(man->connection.sd_cli, (void *)buf, sizeof(buf), MSG_NOSIGNAL); #endif if (len == 0) @@ -2348,7 +2348,7 @@ man_write(struct management *man) } else #endif - sent = send(man->connection.sd_cli, BPTR(buf), len, MSG_NOSIGNAL); + sent = send(man->connection.sd_cli, (const void *)BPTR(buf), len, MSG_NOSIGNAL); if (sent >= 0) { buffer_list_advance(man->connection.out, sent); diff --git a/src/openvpn/proxy.c b/src/openvpn/proxy.c index aa10363c..ed47eaa2 100644 --- a/src/openvpn/proxy.c +++ b/src/openvpn/proxy.c @@ -126,7 +126,7 @@ recv_line(socket_descriptor_t sd, } /* read single char */ - size = recv(sd, &c, 1, MSG_NOSIGNAL); + size = recv(sd, (void *)&c, 1, MSG_NOSIGNAL); /* error? */ if (size != 1)