Commit d888f3ba authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

ws2_32: Consider socket with zero ifindex unbound.

Real interface index can't be zero. getsockopt(..., IP_UNICAST_IF, ...) may return success and zero interface index if IP_UNICAST_IF was never set. Avoids error output which doesn't inidcate a real error condition for such case. Signed-off-by: 's avatarPaul Gofman <pgofman@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent a2fe0d57
......@@ -3788,7 +3788,7 @@ static void interface_bind_check(int fd, struct sockaddr_in *addr)
ret = getsockopt(fd, IPPROTO_IP, IP_UNICAST_IF, &ifindex, &len);
if (!ret) ifindex = ntohl(ifindex);
#endif
if (!ret)
if (!ret && ifindex)
{
EnterCriticalSection(&cs_if_addr_cache);
if (ifindex < if_addr_cache_size)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment