From patchwork Wed Aug 17 03:53:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 2685 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director14.mail.ord1d.rsapps.net ([172.27.255.53]) by backend30.mail.ord1d.rsapps.net with LMTP id eG1qCsYl/mIwNQAAIUCqbw (envelope-from ) for ; Thu, 18 Aug 2022 07:43:02 -0400 Received: from proxy5.mail.iad3a.rsapps.net ([172.27.255.53]) by director14.mail.ord1d.rsapps.net with LMTP id OAoiCsYl/mLXAwAAeJ7fFg (envelope-from ) for ; Thu, 18 Aug 2022 07:43:02 -0400 Received: from smtp7.gate.iad3a ([172.27.255.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy5.mail.iad3a.rsapps.net with LMTPS id 8IkPA8Yl/mLlYAAAhn5joQ (envelope-from ) for ; Thu, 18 Aug 2022 07:43:02 -0400 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: patchwork@openvpn.net X-Originating-Ip: [192.26.174.232] Authentication-Results: smtp7.gate.iad3a.rsapps.net; iprev=pass policy.iprev="192.26.174.232"; spf=pass smtp.mailfrom="arne@rfc2549.org" smtp.helo="mail.blinkt.de"; dkim=none (message not signed) header.d=none; dmarc=none (p=nil; dis=none) header.from=rfc2549.org X-Suspicious-Flag: NO X-Classification-ID: a1c829d8-1eea-11ed-8fff-525400bbebb8-1-1 Received: from [192.26.174.232] ([192.26.174.232:47985] helo=mail.blinkt.de) by smtp7.gate.iad3a.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 82/71-08230-D452EF26; Thu, 18 Aug 2022 07:41:01 -0400 Received: from [195.70.183.100] (helo=[192.168.12.111]) by mail.blinkt.de with esmtpsa (TLS1.3) tls TLS_AES_128_GCM_SHA256 (Exim 4.95 (FreeBSD)) (envelope-from ) id 1oOdtU-0000SQ-0A for patchwork@openvpn.net; Thu, 18 Aug 2022 13:41:00 +0200 Resent-From: Arne Schwabe Resent-To: patchwork@openvpn.net Resent-Date: Thu, 18 Aug 2022 13:40:58 +0200 Resent-Message-ID: Received: from mail.blinkt.de ([unix socket]) by mail.blinkt.de (Cyrus 3.4.4) with LMTPA; Wed, 17 Aug 2022 15:56:20 +0200 X-Cyrus-Session-Id: mail.blinkt.de-1660744580-78456-2-15965946555011151667 X-Sieve: CMU Sieve 3.0 Received: from lists.sourceforge.net ([216.105.38.7]) by mail.blinkt.de with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95 (FreeBSD)) (envelope-from ) id 1oOJWu-000KPN-0C for arne@rfc2549.org; Wed, 17 Aug 2022 15:56:20 +0200 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 1oOJVW-0004Ww-CS; Wed, 17 Aug 2022 13:54:54 +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 1oOJVM-0004Wg-F0 for openvpn-devel@lists.sourceforge.net; Wed, 17 Aug 2022 13:54:45 +0000 Received: from mail.blinkt.de ([192.26.174.232]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1oOJUi-0004No-7w for openvpn-devel@lists.sourceforge.net; Wed, 17 Aug 2022 13:54:19 +0000 Received: from kamera.blinkt.de ([2001:638:502:390:20c:29ff:fec8:535c]) by mail.blinkt.de with smtp (Exim 4.95 (FreeBSD)) (envelope-from ) id 1oOJUS-000KOj-Bd for openvpn-devel@lists.sourceforge.net; Wed, 17 Aug 2022 15:53:48 +0200 Received: (nullmailer pid 844224 invoked by uid 10006); Wed, 17 Aug 2022 13:53:48 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Wed, 17 Aug 2022 15:53:48 +0200 Message-Id: <20220817135348.844178-1-arne@rfc2549.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220316102317.3356246-1-arne@rfc2549.org> References: <20220316102317.3356246-1-arne@rfc2549.org> MIME-Version: 1.0 X-Headers-End: 1oOJUi-0004No-7w Subject: [Openvpn-devel] [PATCH v2] Fix IV_PLAT_VER and UV_ variables sent without push-peer-info 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-Spam-Bar: + X-getmail-retrieved-from-mailbox: Inbox Commit 8c72d7981 changed the push_peer_info_detail to have an additional level for P2P NCP and shifting most of the other levels with 1. The check for UV_ and IV_PLAT_VER was not changed accordingly. Fixes: 8c72d7981 ("Support NCP in pure P2P VPN setups") Signed-off-by: Arne Schwabe Acked-by: Antonio Quartulli --- src/openvpn/ssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c index 77f572a40..33e145b3f 100644 --- a/src/openvpn/ssl.c +++ b/src/openvpn/ssl.c @@ -2036,7 +2036,7 @@ push_peer_info(struct buffer *buf, struct tls_session *session) { if ((((strncmp(e->string, "UV_", 3) == 0 || strncmp(e->string, "IV_PLAT_VER=", sizeof("IV_PLAT_VER=") - 1) == 0) - && session->opt->push_peer_info_detail >= 2) + && session->opt->push_peer_info_detail > 2) || (strncmp(e->string, "IV_GUI_VER=", sizeof("IV_GUI_VER=") - 1) == 0) || (strncmp(e->string, "IV_SSO=", sizeof("IV_SSO=") - 1) == 0) )