mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49:29 +00:00
Use socket_errno() instead of errno in NSE raw socket code, to get
Windows errors.
This commit is contained in:
parent
9fb01bdb3b
commit
5e8f88194d
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue