-
- memset(&IO->Addr, 0, sizeof(struct sockaddr_in6));
- if (IO->IP6) {
- memcpy(&IO->Addr.sin6_addr.s6_addr,
- &SendMsg->pCurrRelay->Addr,
- sizeof(struct in6_addr));
-
- IO->Addr.sin6_family = AF_INET6;
- IO->Addr.sin6_port = htons(IO->dport);
- }
- else {
- struct sockaddr_in *addr = (struct sockaddr_in*) &IO->Addr;
- /* Bypass the ns lookup result like this: IO->Addr.sin_addr.s_addr = inet_addr("127.0.0.1"); * /
- memcpy(&addr->sin_addr,///.s_addr,
- &SendMsg->pCurrRelay->Addr,
- sizeof(struct in_addr));
-
- addr->sin_family = AF_INET;
- addr->sin_port = htons(IO->dport);
- }
+ IO->Addr = &SendMsg->pCurrRelay->Addr;
+ /* Bypass the ns lookup result like this: IO->Addr.sin_addr.s_addr = inet_addr("127.0.0.1"); */