mirror of
https://github.com/OpenVPN/openvpn.git
synced 2026-05-28 04:03:29 -04:00
socket: use remote proto when creating client sockets
When creating a socket to connect to a remote (this happens in client mode) always use the protocol specified for the remote. The listening protocol in this case is just ignored as it does not make any sense. Change-Id: I6d2ec69ac7a9ef5900d8f1d8541d6a19c9cb7df9 Signed-off-by: Antonio Quartulli <antonio@mandelbit.com> Acked-by: Arne Schwabe <arne-openvpn@rfc2549.org> Message-Id: <20250325105724.1285-1-gert@greenie.muc.de> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg31234.html Signed-off-by: Gert Doering <gert@greenie.muc.de>
This commit is contained in:
parent
7825a8c586
commit
39cd7f29cb
1 changed files with 5 additions and 0 deletions
|
|
@ -1903,6 +1903,11 @@ link_socket_init_phase1(struct context *c, int sock_index, int mode)
|
|||
const char *remote_host = o->ce.remote;
|
||||
const char *remote_port = o->ce.remote_port;
|
||||
|
||||
if (remote_host)
|
||||
{
|
||||
proto = o->ce.proto;
|
||||
}
|
||||
|
||||
if (c->mode == CM_CHILD_TCP || c->mode == CM_CHILD_UDP)
|
||||
{
|
||||
struct link_socket *tmp_sock = NULL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue