From a7a1d470fea060979dad5719b1b4ecb3891eb7eb Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 25 Sep 2009 13:39:36 +0000 Subject: [PATCH] - Fix a bug which causes port 0 to be classified as reserved instead of wildcard svn path=/trunk/; revision=43144 --- reactos/dll/win32/wshtcpip/wshtcpip.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/reactos/dll/win32/wshtcpip/wshtcpip.c b/reactos/dll/win32/wshtcpip/wshtcpip.c index 406975c7a86..b799af7c1a9 100644 --- a/reactos/dll/win32/wshtcpip/wshtcpip.c +++ b/reactos/dll/win32/wshtcpip/wshtcpip.c @@ -132,11 +132,12 @@ WSHGetSockaddrType( break; } - SockaddrInfo->EndpointInfo = SockaddrEndpointInfoNormal; if (ntohs(ipv4->sin_port) == 0) SockaddrInfo->EndpointInfo = SockaddrEndpointInfoWildcard; - if (ntohs(ipv4->sin_port) < IPPORT_RESERVED) + else if (ntohs(ipv4->sin_port) < IPPORT_RESERVED) SockaddrInfo->EndpointInfo = SockaddrEndpointInfoReserved; + else + SockaddrInfo->EndpointInfo = SockaddrEndpointInfoNormal; return 0; }