From: "flichtenheld (Code Review)" Date: Wed, 17 Sep 2025 11:58:48 +0000 In-Reply-To: References: Reply-To: frank@...2641..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, antonio@...2726... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="5JiNNqyjwLo="; 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: plaisthos Cc: openvpn-devel --5JiNNqyjwLo= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, plaisthos. Hello ordex, plaisthos, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/1195?usp=3Demail to look at the new patch set (#2). The change is no longer submittable: checks~ChecksSubmitRule is unsatisfied= now. 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 --- 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/2 diff --git a/src/openvpn/dco.c b/src/openvpn/dco.c index 50c72c3..3429ab6 100644 --- a/src/openvpn/dco.c +++ b/src/openvpn/dco.c @@ -496,11 +496,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) { @@ -609,7 +604,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) @@ -655,10 +650,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 b7908a9..a86804b 100644 --- a/src/openvpn/dco_win.c +++ b/src/openvpn/dco_win.c @@ -420,10 +420,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: 2 Gerrit-Owner: flichtenheld Gerrit-Reviewer: ordex Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld Gerrit-MessageType: newpatchset --5JiNNqyjwLo= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: flichtenheld, plaisthos.

flichtenheld uploaded patch set #2 to this change.

<= p>View C= hange

The change is no longer submittable: checks~ChecksSubmitRul= e is unsatisfied now.

dco: Change sd argument to dco_new_peer from int to s=
ocket_descriptor_t

Doesn't change anything for non-Win32 platfor= ms.

Change-Id: I28f856c1c156b54089d95b2e2539ecdb374cdd37
Signed-o= ff-by: Frank Lichtenheld <frank@...2641...>
---
M src/openvpn/d= co.c
M src/openvpn/dco_internal.h
M src/openvpn/dco_win.c
3 files = changed, 4 insertions(+), 13 deletions(-)

git pull ssh://gerrit.o=
penvpn.net:29418/openvpn refs/changes/95/1195/2
diff --git a/src/op=
envpn/dco.c b/src/openvpn/dco.c
index 50c72c3..3429ab6 1006= 44
--- a/src/openvpn/dco.c
+++ b/src/openvp= n/dco.c
@@ -496,11 +496,6 @@
return tr= ue;
}

-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic push=
-#pragma GCC diagnostic ignor= ed "-Wconversion"
-#endif
- int
dco_p2p_add_new_peer(struct context *c)
{
@@ -609,7 +604,7 @@
int = peer_id =3D c->c2.tls_multi->peer_id;
struct soc= kaddr *remoteaddr, *localaddr =3D NULL;
struct sockadd= r_storage local =3D { 0 };
- int sd =3D c->c2.link_sockets[0]->sd;
+ const socket_descriptor_t sd =3D c-&g= t;c2.link_sockets[0]->sd;


= if (c->mode =3D=3D CM_CHILD_TCP)
@@ -655,10 += 650,6 @@
return 0;
}
=
-#if defined(__GNUC__= ) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif
-<= br> 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_int= ernal.h
index 83013ef..86af003 100644
--- a= /src/openvpn/dco_internal.h
+++ b/src/openvpn/dco_internal.= h
@@ -59,7 +59,7 @@
* They are implemente= d by dco_linux.c
*/

-int dco_new_peer(dco_context_t *dco, unsi= gned int peerid, int sd, struct sockaddr *localaddr,
+int dco_new_peer(dco_context_t *dco, unsi= gned int peerid, socket_descriptor_t sd, struct sockaddr *localaddr,=
struct sockaddr *remoteaddr, struct in_addr *vp= n_ipv4, struct 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
inde= x b7908a9..a86804b 100644
--- a/src/openvpn/dco_win.c
+++ b/src/openvpn/dco_win.c
@@ -420,10 +420,10 @= @
}

int
-dco_new_peer(dco_context_t *dco, unsi= gned int peerid, int sd, struct sockaddr *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&qu= ot;, __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)
{
<= br>

To view, visit change 1195. To unsubscribe, or for help writing mai= l filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I28f856c1c156b54089d95b2e253= 9ecdb374cdd37
Gerrit-Change-Number: 1195
Gerrit-PatchSet: 2
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-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-MessageType: newpatchset
--5JiNNqyjwLo=--