diff options
Diffstat (limited to 'src/socket')
-rw-r--r-- | src/socket/ntapi_sc_connect_v2.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/socket/ntapi_sc_connect_v2.c b/src/socket/ntapi_sc_connect_v2.c index 919ee10..5d839f2 100644 --- a/src/socket/ntapi_sc_connect_v2.c +++ b/src/socket/ntapi_sc_connect_v2.c @@ -20,6 +20,8 @@ typedef struct _nt_afd_connect_request { typedef struct __addr_memcpy { uint64_t d0; uint64_t d1; + uint64_t d2; + uint32_t d3; } _addr_memcpy; @@ -36,6 +38,10 @@ int32_t __cdecl __ntapi_sc_connect_v2( _addr_memcpy * src; _addr_memcpy * dst; + if ((addrlen != sizeof(nt_sockaddr_in4)) + && (addrlen != sizeof(nt_sockaddr_in6))) + return NT_STATUS_INVALID_PARAMETER_3; + iosb = iosb ? iosb : &siosb; /* afd_connect_req */ @@ -48,6 +54,11 @@ int32_t __cdecl __ntapi_sc_connect_v2( dst->d0 = src->d0; dst->d1 = src->d1; + if (addrlen == sizeof(nt_sockaddr_in6)) { + dst->d2 = src->d2; + dst->d3 = src->d3; + } + afd_connect_req.paddr = &(afd_connect_req.addr); afd_connect_req.addr.sa_addr_in4.sa_family = hssocket->domain; |