[Openvpn-devel,v1] Fix for msbuild/mingw GHA failures

Message ID 20241023113923.7420-1-gert@greenie.muc.de
State Accepted
Headers show
Series [Openvpn-devel,v1] Fix for msbuild/mingw GHA failures | expand

Commit Message

Gert Doering Oct. 23, 2024, 11:39 a.m. UTC
From: Gianmarco De Gregori <gianmarco@mandelbit.com>

Commit ("event/multi: add event_arg object to make
event handling more generic") accidentally removed
a variable declaration and its usage because of a
rebase, this fix restore the wiped out
unsigned int *persistent in multi_tcp_wait().

Change-Id: I8526aadb5151ddc997c836d5a691bcdfee700938
Signed-off-by: Gianmarco De Gregori <gianmarco@mandelbit.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
---

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

Acked-by according to Gerrit (reflected above):
Gert Doering <gert@greenie.muc.de>

Comments

Gert Doering Oct. 23, 2024, 12:02 p.m. UTC | #1
Thanks for quickly fixing this.  (Morale 1: don't do "while I am here,
let's clean up this other thing" changes..., Morale 2: we need windows
builds in gerrit/buildbot)

I've reworded the commit message a bit, to reference the actual commit
ID in question, and to make it more clear what happened.

The patch itself is a trivial undo of those 2 lines, easily verified
with "git diff HEAD~2".

(A later patch in the series actually does the same thing, when moving
the code to multi_io.c - so "test the whole tree via GHA" did not
expose the problem)

Your patch has been applied to the master branch.

commit 3636da3b0f168d8e06a00ec5d1f33e4b9aded262
Author: Gianmarco De Gregori
Date:   Wed Oct 23 13:39:23 2024 +0200

     Fix for msbuild/mingw GHA failures

     Signed-off-by: Gianmarco De Gregori <gianmarco@mandelbit.com>
     Acked-by: Gert Doering <gert@greenie.muc.de>
     Message-Id: <20241023113923.7420-1-gert@greenie.muc.de>
     URL: https://www.mail-archive.com/search?l=mid&q=20241023113923.7420-1-gert@greenie.muc.de
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/src/openvpn/mtcp.c b/src/openvpn/mtcp.c
index 67e3e8e..6faf45a 100644
--- a/src/openvpn/mtcp.c
+++ b/src/openvpn/mtcp.c
@@ -254,6 +254,7 @@ 
                struct multi_tcp *mtcp)
 {
     int status;
+    unsigned int *persistent = &mtcp->tun_rwflags;
     socket_set_listen_persistent(c->c2.link_socket, mtcp->es,
                                  &c->c2.link_socket->ev_arg);
 
@@ -271,7 +272,7 @@ 
         persistent = NULL;
     }
 #endif
-    tun_set(c->c1.tuntap, mtcp->es, EVENT_READ, MTCP_TUN, &mtcp->tun_rwflags);
+    tun_set(c->c1.tuntap, mtcp->es, EVENT_READ, MTCP_TUN, persistent);
 #if defined(TARGET_LINUX) || defined(TARGET_FREEBSD)
     dco_event_set(&c->c1.tuntap->dco, mtcp->es, MTCP_DCO);
 #endif