Skip to contentSkip to conversation

Change in openvpn[master]: Fix oversight of link socket code change in Android code path

Openvpn-devel In review plaisthos (Code Review) 2 participants 6 messages Feb 12, 2025 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): gerrit.1739361204000.If6a636b2099d948e249cf92ed2ba91d1698ee42f@...2715...

#1 lore raw

Attention is currently required from: flichtenheld.

Hello flichtenheld,

I'd like you to do a code review.
Please visit

    http://gerrit.openvpn.net/c/openvpn/+/888?usp=email

to review the following change.

Change subject: Fix oversight of link socket code change in Android code path
......................................................................

Fix oversight of link socket code change in Android code path

Commit 94b391d7ef5 changed context->link_socket to context->link_sockets but did not change the Android code path.

Change-Id If6a636b2099d948e249cf92ed2ba91d1698ee42f

---
M src/openvpn/init.c

1 file changed, 3 insertions(+), 3 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/88/888/1

src/openvpn/init.c +3 -3
index 4014517..a7f7db4 100644
@@ -4381,16 +4381,16 @@
 
     int socketfd = -1;
     struct context *c = (struct context *) arg;
-    if (!c->c2.link_socket)
+    if (!c->c2.link_sockets || !c->c2.link_sockets[0])
     {
         return -1;
     }
-    if (c->c2.link_socket->sd == SOCKET_UNDEFINED)
+    if (c->c2.link_sockets[0]->sd == SOCKET_UNDEFINED)
     {
         return -1;
     }
 
-    socketfd = c->c2.link_socket->sd;
+    socketfd = c->c2.link_sockets[0]->sd;
     if (!c->options.pull || c->c2.tls_multi->use_peer_id || samenetwork)
     {
         return socketfd;

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/888?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: If6a636b2099d948e249cf92ed2ba91d1698ee42f
Gerrit-Change-Number: 888
Gerrit-PatchSet: 1
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-MessageType: newchange

#2 lore raw
In reply to a message not in the archive

Attention is currently required from: flichtenheld, plaisthos.

cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/888?usp=email )

Change subject: Fix oversight of link socket code change in Android code path
......................................................................

Patch Set 1: Code-Review+2

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/888?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: If6a636b2099d948e249cf92ed2ba91d1698ee42f
Gerrit-Change-Number: 888
Gerrit-PatchSet: 1
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Wed, 12 Feb 2025 12:37:30 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

#3 lore raw

PATCH 1/1 Fix oversight of link socket code change in Android code path

In reply to a message not in the archive

From: Arne Schwabe <[email protected]...>

Commit 94b391d7ef5 changed context->link_socket to context->link_sockets but did not change the Android code path.

Change-Id If6a636b2099d948e249cf92ed2ba91d1698ee42f

---

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

Acked-by according to Gerrit (reflected above):
Gert Doering <[email protected]...>

src/openvpn/init.c +3 -3
index 4014517..a7f7db4 100644
@@ -4381,16 +4381,16 @@
 
     int socketfd = -1;
     struct context *c = (struct context *) arg;
-    if (!c->c2.link_socket)
+    if (!c->c2.link_sockets || !c->c2.link_sockets[0])
     {
         return -1;
     }
-    if (c->c2.link_socket->sd == SOCKET_UNDEFINED)
+    if (c->c2.link_sockets[0]->sd == SOCKET_UNDEFINED)
     {
         return -1;
     }
 
-    socketfd = c->c2.link_socket->sd;
+    socketfd = c->c2.link_sockets[0]->sd;
     if (!c->options.pull || c->c2.tls_multi->use_peer_id || samenetwork)
     {
         return socketfd;
#4 lore raw

[Openvpn-devel] [PATCH applied] Re: Fix oversight of link socket code change in Android code path

Another one of those that we should have seen... sorry for that.

(I have not tested this, but it's inside #ifdef TARGET_ANDROID and looks like the correct adjustment, so if Arne says "this makes it work" it's good enough for me)

Your patch has been applied to the master branch.

commit 3ddfe26e491f9d74da54feb981116f7b8ef19a70

Author: Arne Schwabe
Date:   Wed Feb 12 13:38:20 2025 +0100
     Fix oversight of link socket code change in Android code path

     Signed-off-by: Arne Schwabe <[email protected]...>
     Acked-by: Gert Doering <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg30833.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering

#5 lore raw
In reply to a message not in the archive

cron2 has uploaded a new patch set (#2) to the change originally created by plaisthos. ( http://gerrit.openvpn.net/c/openvpn/+/888?usp=email )

The following approvals got outdated and were removed:
Code-Review+2 by cron2

Change subject: Fix oversight of link socket code change in Android code path
......................................................................

Fix oversight of link socket code change in Android code path

Commit 94b391d7ef5 changed context->link_socket to context->link_sockets but did not change the Android code path.

Change-Id If6a636b2099d948e249cf92ed2ba91d1698ee42f

Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg30833.html

---
M src/openvpn/init.c

1 file changed, 3 insertions(+), 3 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/88/888/2

src/openvpn/init.c +3 -3
index 4014517..a7f7db4 100644
@@ -4381,16 +4381,16 @@
 
     int socketfd = -1;
     struct context *c = (struct context *) arg;
-    if (!c->c2.link_socket)
+    if (!c->c2.link_sockets || !c->c2.link_sockets[0])
     {
         return -1;
     }
-    if (c->c2.link_socket->sd == SOCKET_UNDEFINED)
+    if (c->c2.link_sockets[0]->sd == SOCKET_UNDEFINED)
     {
         return -1;
     }
 
-    socketfd = c->c2.link_socket->sd;
+    socketfd = c->c2.link_sockets[0]->sd;
     if (!c->options.pull || c->c2.tls_multi->use_peer_id || samenetwork)
     {
         return socketfd;

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/888?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: If6a636b2099d948e249cf92ed2ba91d1698ee42f
Gerrit-Change-Number: 888
Gerrit-PatchSet: 2
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newpatchset

#6 lore raw
In reply to a message not in the archive

cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/888?usp=email )

Change subject: Fix oversight of link socket code change in Android code path
......................................................................

Fix oversight of link socket code change in Android code path

Commit 94b391d7ef5 changed context->link_socket to context->link_sockets but did not change the Android code path.

Change-Id If6a636b2099d948e249cf92ed2ba91d1698ee42f

Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg30833.html

---
M src/openvpn/init.c

1 file changed, 3 insertions(+), 3 deletions(-)
src/openvpn/init.c +3 -3
index 4014517..a7f7db4 100644
@@ -4381,16 +4381,16 @@
 
     int socketfd = -1;
     struct context *c = (struct context *) arg;
-    if (!c->c2.link_socket)
+    if (!c->c2.link_sockets || !c->c2.link_sockets[0])
     {
         return -1;
     }
-    if (c->c2.link_socket->sd == SOCKET_UNDEFINED)
+    if (c->c2.link_sockets[0]->sd == SOCKET_UNDEFINED)
     {
         return -1;
     }
 
-    socketfd = c->c2.link_socket->sd;
+    socketfd = c->c2.link_sockets[0]->sd;
     if (!c->options.pull || c->c2.tls_multi->use_peer_id || samenetwork)
     {
         return socketfd;

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/888?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: If6a636b2099d948e249cf92ed2ba91d1698ee42f
Gerrit-Change-Number: 888
Gerrit-PatchSet: 2
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged