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