From c4f5a8c1c9b20728005cd03a893d4ac595b50dc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Jos=C3=A9=20Nicola?= Date: Thu, 8 Sep 2022 13:20:15 +0200 Subject: [PATCH] Fix: set transport again if falls back in a unecrypted connection (#1190) In case of falling back in a unencrypted connection, set the transport to OPENVAS_ENCAPS_IP again. --- nasl/nasl_builtin_find_service.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nasl/nasl_builtin_find_service.c b/nasl/nasl_builtin_find_service.c index cf62cd398..ec2f8e4cc 100644 --- a/nasl/nasl_builtin_find_service.c +++ b/nasl/nasl_builtin_find_service.c @@ -1542,7 +1542,8 @@ retry_stream_connection (int test_ssl, struct script_infos *desc, int port, g_debug ("%s: unable to establish a TLS connection to %s; falling " "back to unencrypted connection", __func__, plug_get_host_fqdn (desc)); - cnx = open_stream_connection (desc, port, OPENVAS_ENCAPS_IP, timeout); + *trp = OPENVAS_ENCAPS_IP; + cnx = open_stream_connection (desc, port, *trp, timeout); } }