Skip to content

Commit

Permalink
Fix oversight of link socket code change in Android code path
Browse files Browse the repository at this point in the history
Commit 94b391d changed context->link_socket to context->link_sockets
but did not change the Android code path.

Change-Id: If6a636b2099d948e249cf92ed2ba91d1698ee42f
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]>
  • Loading branch information
schwabe authored and cron2 committed Feb 12, 2025
1 parent f3268ee commit 3ddfe26
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/openvpn/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -4381,16 +4381,16 @@ management_callback_network_change(void *arg, bool samenetwork)

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;
Expand Down

0 comments on commit 3ddfe26

Please sign in to comment.