diff options
author | midipix <writeonce@midipix.org> | 2016-06-17 15:26:49 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-06-17 15:26:49 -0400 |
commit | 4543c962b1488e1ccbf1fe224837e4756ddd114c (patch) | |
tree | cfa2a5c24571696065df6670cb2270b7b5261030 /src/socket | |
parent | 87511ee62527a04f87029f48a8365e3c2e10df42 (diff) | |
download | ntapi-4543c962b1488e1ccbf1fe224837e4756ddd114c.tar.bz2 ntapi-4543c962b1488e1ccbf1fe224837e4756ddd114c.tar.xz |
__ntapi_sc_accept(): fix handling of ipv6 addresses.
Diffstat (limited to 'src/socket')
-rw-r--r-- | src/socket/ntapi_sc_accept.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/socket/ntapi_sc_accept.c b/src/socket/ntapi_sc_accept.c index 3390616..bda6a83 100644 --- a/src/socket/ntapi_sc_accept.c +++ b/src/socket/ntapi_sc_accept.c @@ -14,6 +14,8 @@ typedef struct __addr_memcpy { uint64_t d0; uint64_t d1; + uint64_t d2; + uint32_t d3; } _addr_memcpy; @@ -72,6 +74,15 @@ int32_t __cdecl __ntapi_sc_accept( dst->d0 = src->d0; dst->d1 = src->d1; + + if ((size_t)iosb->info >= sizeof(accept_info.sequence) + + sizeof(nt_sockaddr_in6)) { + dst->d2 = src->d2; + dst->d3 = src->d3; + } else { + dst->d2 = 0; + dst->d3 = 0; + } } /* return address length information */ |