1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-23 01:49:53 +03:00

Merge pull request #1513 from domosekai/rudp

Restore R-UDP listener when ListenIP is ::
This commit is contained in:
Yihong Wu 2021-12-09 12:54:05 +08:00 committed by GitHub
commit 5cac4481f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5212,13 +5212,23 @@ RUDP_STACK *NewRUDP(bool server_mode, char *svc_name, RUDP_STACK_INTERRUPTS_PROC
} }
else else
{ {
if (rand_port_id == 0) IP ip;
if (IsZeroIP(listen_ip) && IsIP6(listen_ip))
{ {
sock = NewUDPEx2(port, false, listen_ip); ZeroIP4(&ip);
} }
else else
{ {
sock = NewUDPEx2RandMachineAndExePath(false, listen_ip, 0, rand_port_id); CopyIP(&ip, listen_ip);
}
if (rand_port_id == 0)
{
sock = NewUDPEx2(port, false, &ip);
}
else
{
sock = NewUDPEx2RandMachineAndExePath(false, &ip, 0, rand_port_id);
} }
} }