diff --git a/src/Cedar/Protocol.c b/src/Cedar/Protocol.c index 748d88bb..94f2a682 100644 --- a/src/Cedar/Protocol.c +++ b/src/Cedar/Protocol.c @@ -6403,7 +6403,7 @@ SOCK *ClientConnectGetSocket(CONNECTION *c, bool additional_connect) if (additional_connect == false || IsZeroIP(&sock->RemoteIP)) { - if (((sock->IsRUDPSocket || sock->IPv6) && IsZeroIP(&sock->RemoteIP) == false && o->ProxyType == PROXY_DIRECT) || GetIP(&c->Session->ServerIP, hostname) == false) + if (IsZeroIP(&sock->RemoteIP) == false || (sock->IPv6 && GetIP6(&c->Session->ServerIP, hostname) == false) || (sock->IPv6 == false && GetIP4(&c->Session->ServerIP, hostname) == false)) { Copy(&c->Session->ServerIP, &sock->RemoteIP, sizeof(c->Session->ServerIP)); }