mirror of
https://github.com/rapid7/metasploit-payloads
synced 2024-12-08 23:33:07 +01:00
Fix small issue with return results
This commit is contained in:
parent
c947f9d1f6
commit
9f4a66ba8a
@ -305,9 +305,11 @@ DWORD request_net_tcp_server_channel_open(Remote * remote, Packet * packet)
|
||||
if (bind(ctx->fd, (SOCKADDR *)&saddr, sizeof(SOCKADDR_IN)) == SOCKET_ERROR)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
if (WSAGetLastError() != WSAEADDRNOTAVAIL)
|
||||
dwResult = WSAGetLastError();
|
||||
if (dwResult != WSAEADDRNOTAVAIL)
|
||||
#else
|
||||
if (errno != EADDRNOTAVAIL)
|
||||
dwResult = errno;
|
||||
if (dwResult != EADDRNOTAVAIL)
|
||||
#endif
|
||||
{
|
||||
BREAK_ON_WSAERROR("[TCP-SERVER] request_net_tcp_server_channel_open. bind failed");
|
||||
@ -322,6 +324,7 @@ DWORD request_net_tcp_server_channel_open(Remote * remote, Packet * packet)
|
||||
{
|
||||
BREAK_ON_WSAERROR("[TCP-SERVER] request_net_tcp_server_channel_open. bind failed");
|
||||
}
|
||||
dwResult = ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
if (listen(ctx->fd, SOMAXCONN) == SOCKET_ERROR)
|
||||
|
Loading…
Reference in New Issue
Block a user