[Openvpn-devel,v1] ssl_ncp: Fix type of "found" parameter of check_pull_client_ncp

Message ID 20260331060112.5195-1-gert@greenie.muc.de
State New
Headers show
Series [Openvpn-devel,v1] ssl_ncp: Fix type of "found" parameter of check_pull_client_ncp | expand

Commit Message

Gert Doering March 31, 2026, 6:01 a.m. UTC
From: Frank Lichtenheld <frank@lichtenheld.com>

In commit 91fd9614f980b02772e4dfbb09144c822ec97df0 type
of "found" was changed to uint64_t. But due to -Wconversion
not yet enabled in all of init.c one occurence of the old
type was missed.

Change-Id: I1a6dfc175075636bc7a5761215547077a9dc397a
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Arne Schwabe <arne-openvpn@rfc2549.org>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1594
---

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/+/1594
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Arne Schwabe <arne-openvpn@rfc2549.org>

Comments

Gert Doering March 31, 2026, 7:59 a.m. UTC | #1
Good catch :-) - since the other uint64 options bits patch did not go
to release/2.7, this one also doesn't.

Your patch has been applied to the master branch.

commit 3ba76022430adce09b1ead0438b5c1fe99d3e661
Author: Frank Lichtenheld
Date:   Tue Mar 31 08:01:05 2026 +0200

     ssl_ncp: Fix type of found parameter of check_pull_client_ncp

     Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
     Acked-by: Arne Schwabe <arne-openvpn@rfc2549.org>
     Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1594
     Message-Id: <20260331060112.5195-1-gert@greenie.muc.de>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg36364.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/src/openvpn/ssl_ncp.c b/src/openvpn/ssl_ncp.c
index fdac6925..649665a 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 unsigned int found)
+check_pull_client_ncp(struct context *c, const uint64_t found)
 {
     if (found & OPT_P_NCP)
     {
diff --git a/src/openvpn/ssl_ncp.h b/src/openvpn/ssl_ncp.h
index 837f662..dc3a750 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, unsigned int found);
+bool check_pull_client_ncp(struct context *c, uint64_t found);
 
 /**
  * Iterates through the ciphers in server_list and return the first