mirror of
https://github.com/nmap/nmap.git
synced 2026-02-08 06:26:33 +00:00
Allow NSE to connect via DTLS
This commit is contained in:
@@ -562,9 +562,12 @@ static int connect (lua_State *L, int status, lua_KContext ctx)
|
||||
dest->ai_addrlen, port);
|
||||
break;
|
||||
case SSL:
|
||||
nu->proto = IPPROTO_TCP;
|
||||
if (nu->proto != IPPROTO_UDP) {
|
||||
// Assume TCP unless we're explicitly connecting to a UDP port
|
||||
nu->proto = IPPROTO_TCP;
|
||||
}
|
||||
nsock_connect_ssl(nsp, nu->nsiod, callback, nu->timeout, nu,
|
||||
dest->ai_addr, dest->ai_addrlen, IPPROTO_TCP, port, nu->ssl_session);
|
||||
dest->ai_addr, dest->ai_addrlen, nu->proto, port, nu->ssl_session);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user