mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-22 17:39:53 +03:00
Save the correct server IP for route management
This commit is contained in:
parent
384ab07996
commit
02ee7b45d7
@ -6403,7 +6403,7 @@ SOCK *ClientConnectGetSocket(CONNECTION *c, bool additional_connect)
|
|||||||
|
|
||||||
if (additional_connect == false || IsZeroIP(&sock->RemoteIP))
|
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));
|
Copy(&c->Session->ServerIP, &sock->RemoteIP, sizeof(c->Session->ServerIP));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user