From: "cron2 (Code Review)" Date: Fri, 26 Sep 2025 20:53:12 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641..., antonio@...2726... Message-ID: <0f5e245ca760c28c532edf57edf2500a53083340-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="FJZ5mQIKj0U="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: dco: Change sd argument to dco_new_peer from int to socket_descriptor_t List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: flichtenheld , plaisthos Cc: openvpn-devel --FJZ5mQIKj0U= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#8) to the change originally created by= flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1195?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by ordex Change subject: dco: Change sd argument to dco_new_peer from int to socket_= descriptor_t ...................................................................... dco: Change sd argument to dco_new_peer from int to socket_descriptor_t Doesn't change anything for non-Win32 platforms. Change-Id: I28f856c1c156b54089d95b2e2539ecdb374cdd37 Signed-off-by: Frank Lichtenheld Acked-by: Antonio Quartulli Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1195 Message-Id: <20250924151044.50567-1-frank@...2641...> URL: https://sourceforge.net/p/openvpn/mailman/message/59238248/ Signed-off-by: Gert Doering --- M src/openvpn/dco.c M src/openvpn/dco_internal.h M src/openvpn/dco_win.c 3 files changed, 4 insertions(+), 13 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/95/1195/8 diff --git a/src/openvpn/dco.c b/src/openvpn/dco.c index 2cf90af..6afc680 100644 --- a/src/openvpn/dco.c +++ b/src/openvpn/dco.c @@ -491,11 +491,6 @@ return true; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - int dco_p2p_add_new_peer(struct context *c) { @@ -604,7 +599,7 @@ int peer_id =3D c->c2.tls_multi->peer_id; struct sockaddr *remoteaddr, *localaddr =3D NULL; struct sockaddr_storage local =3D { 0 }; - int sd =3D c->c2.link_sockets[0]->sd; + const socket_descriptor_t sd =3D c->c2.link_sockets[0]->sd; if (c->mode =3D=3D CM_CHILD_TCP) @@ -650,10 +645,6 @@ return 0; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic pop -#endif - void dco_install_iroute(struct multi_context *m, struct multi_instance *mi, str= uct mroute_addr *addr) { diff --git a/src/openvpn/dco_internal.h b/src/openvpn/dco_internal.h index 83013ef..86af003 100644 --- a/src/openvpn/dco_internal.h +++ b/src/openvpn/dco_internal.h @@ -59,7 +59,7 @@ * They are implemented by dco_linux.c */ -int dco_new_peer(dco_context_t *dco, unsigned int peerid, int sd, struct s= ockaddr *localaddr, +int dco_new_peer(dco_context_t *dco, unsigned int peerid, socket_descripto= r_t sd, struct sockaddr *localaddr, struct sockaddr *remoteaddr, struct in_addr *vpn_ipv4, st= ruct in6_addr *vpn_ipv6); int dco_del_peer(dco_context_t *dco, unsigned int peerid); diff --git a/src/openvpn/dco_win.c b/src/openvpn/dco_win.c index 7dd43d6..4dd307f 100644 --- a/src/openvpn/dco_win.c +++ b/src/openvpn/dco_win.c @@ -415,10 +415,10 @@ } int -dco_new_peer(dco_context_t *dco, unsigned int peerid, int sd, struct socka= ddr *localaddr, +dco_new_peer(dco_context_t *dco, unsigned int peerid, socket_descriptor_t = sd, struct sockaddr *localaddr, struct sockaddr *remoteaddr, struct in_addr *vpn_ipv4, struct= in6_addr *vpn_ipv6) { - msg(D_DCO_DEBUG, "%s: peer-id %d, fd %d", __func__, peerid, sd); + msg(D_DCO_DEBUG, "%s: peer-id %d, fd " SOCKET_PRINTF, __func__, peerid= , sd); if (dco->ifmode =3D=3D DCO_MODE_P2P) { -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1195?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I28f856c1c156b54089d95b2e2539ecdb374cdd37 Gerrit-Change-Number: 1195 Gerrit-PatchSet: 8 Gerrit-Owner: flichtenheld Gerrit-Reviewer: ordex Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-MessageType: newpatchset --FJZ5mQIKj0U= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 uploaded patch set #8 to the change originally cr= eated by flichtenheld.

View Change

The following approvals got outd= ated and were removed: Code-Review+2 by ordex

dco: Change sd argument to dco_new_peer from int to =
socket_descriptor_t

Doesn't change anything for non-Win32 platfo= rms.

Change-Id: I28f856c1c156b54089d95b2e2539ecdb374cdd37
Signed-= off-by: Frank Lichtenheld <frank@...2641...>
Acked-by: Antonio Qua= rtulli <antonio@...2726...>
Gerrit URL: https://gerrit.openvpn.net= /c/openvpn/+/1195
Message-Id: <20250924151044.50567-1-frank@...2723...= .>
URL: https://sourceforge.net/p/openvpn/mailman/message/59238248/Signed-off-by: Gert Doering <gert@...1296...>
---
M src/openv= pn/dco.c
M src/openvpn/dco_internal.h
M src/openvpn/dco_win.c
3 fi= les changed, 4 insertions(+), 13 deletions(-)

git pull ssh://gerr=
it.openvpn.net:29418/openvpn refs/changes/95/1195/8
diff --git a/sr=
c/openvpn/dco.c b/src/openvpn/dco.c
index 2cf90af..6afc680 = 100644
--- a/src/openvpn/dco.c
+++ b/src/op= envpn/dco.c
@@ -491,11 +491,6 @@
retur= n true;
}

-#if defined(__GNUC__) || defined(__clang__)-#pragma GCC diagnostic push
-#pragma GCC diagnostic i= gnored "-Wconversion"
-#endif
-
int
dco_p2p_add_new_peer(struct context *c)
{
@@ -604,7 +599,7 @@
= int peer_id =3D c->c2.tls_multi->peer_id;
struct= sockaddr *remoteaddr, *localaddr =3D NULL;
struct soc= kaddr_storage local =3D { 0 };
- int sd =3D c->c2.link_sockets[0]->sd;
+ const socket_descriptor_t sd =3D c= ->c2.link_sockets[0]->sd;

<= br> if (c->mode =3D=3D CM_CHILD_TCP)
@@ -650,1= 0 +645,6 @@
return 0;
}

-#if defined(__GNU= C__) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif
-
void
dco_install_iroute(struct multi_context = *m, struct multi_instance *mi, struct mroute_addr *addr)
{=
diff --git a/src/openvpn/dco_internal.h b/src/openvpn/dco_= internal.h
index 83013ef..86af003 100644
--= - a/src/openvpn/dco_internal.h
+++ b/src/openvpn/dco_intern= al.h
@@ -59,7 +59,7 @@
* They are impleme= nted by dco_linux.c
*/

-int dco_new_peer(dco_context_t *dco, u= nsigned int peerid, int sd, struct sockaddr *localaddr,
+int dco_new_peer(dco_context_t *dco, un= signed int peerid, socket_descriptor_t sd, struct sockaddr *localaddr,
struct sockaddr *remoteaddr, struct in_addr *= vpn_ipv4, struct in6_addr *vpn_ipv6);

in= t dco_del_peer(dco_context_t *dco, unsigned int peerid);
di= ff --git a/src/openvpn/dco_win.c b/src/openvpn/dco_win.c
in= dex 7dd43d6..4dd307f 100644
--- a/src/openvpn/dco_win.c
+++ b/src/openvpn/dco_win.c
@@ -415,10 +415,10= @@
}

int
-dco_new_peer(dco_context_t *dco, un= signed int peerid, int sd, struct sockaddr *localaddr,

+dco_new_peer(dco_context_t *dco, unsigne= d int peerid, socket_descriptor_t sd, struct sockaddr *localaddr, struct sockaddr *remoteaddr, struct in_addr *vpn_ipv4,= struct in6_addr *vpn_ipv6)
{
- msg(D_DCO_DEBUG, "%s: peer-id %d, fd %d&q= uot;, __func__, peerid, sd);
+ msg(D_DCO_DEBUG, "%s: peer-id %d, fd " SOCKET_PRINTF= , __func__, peerid, sd);

if (dco->= ;ifmode =3D=3D DCO_MODE_P2P)
{
=

To view, visit change 1195. To unsubscribe, or for help writing ma= il filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I28f856c1c156b54089d95b2e253= 9ecdb374cdd37
Gerrit-Change-Number: 1195
Gerrit-PatchSet: 8
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: ordex <antonio@...2726...&= gt;
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-MessageType: newpatchset
--FJZ5mQIKj0U=--