1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-08 23:49:03 +00:00

Use socket_errno() instead of errno in NSE raw socket code, to get

Windows errors.
This commit is contained in:
david
2010-03-02 18:29:22 +00:00
parent 9fb01bdb3b
commit 5e8f88194d

View File

@@ -2070,7 +2070,7 @@ static int l_dnet_open_ip(lua_State * L)
if (udata->sock == -1) {
lua_pushboolean(L, false);
lua_pushfstring(L, "Failed to open raw socket: %s (errno %d)", socket_strerror(errno), errno);
lua_pushfstring(L, "Failed to open raw socket: %s (errno %d)", socket_strerror(socket_errno()), socket_errno());
return 2;
}
@@ -2198,7 +2198,7 @@ usesock:
}
if (ret == -1) {
lua_pushboolean(L, false);
lua_pushfstring(L, "Error while sending: %s (errno %d)", socket_strerror(errno), errno);
lua_pushfstring(L, "Error while sending: %s (errno %d)", socket_strerror(socket_errno()), socket_errno());
return 2;
}
lua_pushboolean(L, true);