mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
Fixes for NOIPV6
Fixes to compile without IPv6 support
This commit is contained in:
1 parent
278955deef
commit
b5bcb44e27
6 files changed
+41
-15
No files matched your search
+5
-1
@@ -153,8 +153,12 @@ void * sockschild(struct clientparam* param) {
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
|
||||
|
||||
#ifndef NOIPV6
|
||||
memcpy(¶m->sinsl, *SAFAMILY(¶m->req)==AF_INET6? (struct sockaddr *)¶m->srv->extsa6:(struct sockaddr *)¶m->srv->extsa, SASIZE(¶m->req));
|
||||
#else
|
||||
memcpy(¶m->sinsl, ¶m->srv->extsa, SASIZE(¶m->req));
|
||||
#endif
|
||||
if(!*SAPORT(¶m->sinsl))*SAPORT(¶m->sinsl) = port;
|
||||
if ((param->remsock=so._socket(*SAFAMILY(¶m->req), command == 2? SOCK_STREAM:SOCK_DGRAM, command == 2?IPPROTO_TCP:IPPROTO_UDP)) == INVALID_SOCKET) {RETURN (11);}
|
||||
param->operation = command == 2?BIND:UDPASSOC;
|
||||
|
||||
Reference in new issue
Block a user