[Openvpn-devel] Fix IV_PLAT_VER and UV_ variables sent without push-peer-info

Message ID 20220316102317.3356246-1-arne@rfc2549.org
State Changes Requested
Headers show
Series [Openvpn-devel] Fix IV_PLAT_VER and UV_ variables sent without push-peer-info | expand

Commit Message

Arne Schwabe March 15, 2022, 11:23 p.m. UTC
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.
---
 src/openvpn/ssl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c
index ca028856..87b476b2 100644
--- a/src/openvpn/ssl.c
+++ b/src/openvpn/ssl.c
@@ -2255,7 +2255,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)
                     )