1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-06-28 11:55:08 +03:00

v4.38-9760-rtm

This commit is contained in:
dnobori 2021-08-17 22:56:35 +09:00
parent 005285bf43
commit 3fa9303e99
10 changed files with 37 additions and 20 deletions

View File

@ -126,10 +126,10 @@
// Version number // Version number
#define CEDAR_VER 437 #define CEDAR_VER 438
// Build Number // Build Number
#define CEDAR_BUILD 9758 #define CEDAR_BUILD 9760
// Beta number // Beta number
//#define BETA_NUMBER 3 //#define BETA_NUMBER 3
@ -150,10 +150,10 @@
// Specifies the build date // Specifies the build date
#define BUILD_DATE_Y 2021 #define BUILD_DATE_Y 2021
#define BUILD_DATE_M 8 #define BUILD_DATE_M 8
#define BUILD_DATE_D 16 #define BUILD_DATE_D 17
#define BUILD_DATE_HO 0 #define BUILD_DATE_HO 22
#define BUILD_DATE_MI 27 #define BUILD_DATE_MI 14
#define BUILD_DATE_SE 11 #define BUILD_DATE_SE 6
// Tolerable time difference // Tolerable time difference
#define ALLOW_TIMESTAMP_DIFF (UINT64)(3 * 24 * 60 * 60 * 1000) #define ALLOW_TIMESTAMP_DIFF (UINT64)(3 * 24 * 60 * 60 * 1000)

View File

@ -1484,13 +1484,13 @@ void SendInformationalExchangePacketEx(IKE_SERVER *ike, IKE_CLIENT *c, IKE_PACKE
IkeSendUdpPacket(ike, IKE_UDP_TYPE_ISAKMP, &c->ServerIP, c->ServerPort, IkeSendUdpPacket(ike, IKE_UDP_TYPE_ISAKMP, &c->ServerIP, c->ServerPort,
&c->ClientIP, c->ClientPort, &c->ClientIP, c->ClientPort,
ps_buf->Buf, ps_buf->Size); Clone(ps_buf->Buf, ps_buf->Size), ps_buf->Size);
#ifdef RAW_DEBUG #ifdef RAW_DEBUG
IkeDebugUdpSendRawPacket(ps); IkeDebugUdpSendRawPacket(ps);
#endif // RAW_DEBUG #endif // RAW_DEBUG
Free(ps_buf); FreeBuf(ps_buf);
IkeFree(ps); IkeFree(ps);
} }
@ -4122,9 +4122,9 @@ void IPsecSaSendPacket(IKE_SERVER *ike, IPSECSA *sa, IKE_PACKET *p)
IkeSendUdpPacket(ike, IKE_UDP_TYPE_ISAKMP, &sa->IkeClient->ServerIP, sa->IkeClient->ServerPort, IkeSendUdpPacket(ike, IKE_UDP_TYPE_ISAKMP, &sa->IkeClient->ServerIP, sa->IkeClient->ServerPort,
&sa->IkeClient->ClientIP, sa->IkeClient->ClientPort, &sa->IkeClient->ClientIP, sa->IkeClient->ClientPort,
buf->Buf, buf->Size); Clone(buf->Buf, buf->Size), buf->Size);
Free(buf); FreeBuf(buf);
} }
// Send a packet using the IKE SA // Send a packet using the IKE SA
@ -4182,9 +4182,9 @@ void IkeSaSendPacket(IKE_SERVER *ike, IKE_SA *sa, IKE_PACKET *p)
IkeSendUdpPacket(ike, IKE_UDP_TYPE_ISAKMP, &sa->IkeClient->ServerIP, sa->IkeClient->ServerPort, IkeSendUdpPacket(ike, IKE_UDP_TYPE_ISAKMP, &sa->IkeClient->ServerIP, sa->IkeClient->ServerPort,
&sa->IkeClient->ClientIP, sa->IkeClient->ClientPort, &sa->IkeClient->ClientIP, sa->IkeClient->ClientPort,
buf->Buf, buf->Size); Clone(buf->Buf, buf->Size), buf->Size);
Free(buf); FreeBuf(buf);
} }
// Send an UDP packet // Send an UDP packet

View File

@ -1,4 +1,4 @@
BUILD_NUMBER 9758 BUILD_NUMBER 9760
VERSION 437 VERSION 438
BUILD_NAME beta BUILD_NAME rtm
BUILD_DATE 20210816_002711 BUILD_DATE 20210817_221406

View File

@ -20448,6 +20448,7 @@ void UdpListenerThread(THREAD *thread, void *param)
while (u->Halt == false) while (u->Halt == false)
{ {
LIST *recv_list; LIST *recv_list;
UINT recv_list_total_size = 0;
UINT64 now = Tick64(); UINT64 now = Tick64();
UINT interval; UINT interval;
bool stage_changed = false; bool stage_changed = false;
@ -20621,6 +20622,7 @@ LABEL_RESTART:
stage_changed = false; stage_changed = false;
recv_list = NewListFast(NULL); recv_list = NewListFast(NULL);
recv_list_total_size = 0;
if (u->PollMyIpAndPort) if (u->PollMyIpAndPort)
{ {
@ -20670,8 +20672,15 @@ LABEL_RESTART:
IP src_addr; IP src_addr;
UINT src_port; UINT src_port;
UDPPACKET *p; UDPPACKET *p;
UINT size;
UINT size = RecvFrom(us->Sock, &src_addr, &src_port, buf, buf_size); if (u->RecvBufSize != 0 && recv_list_total_size >= u->RecvBufSize)
{
// No more receive packet since the buffer is full
break;
}
size = RecvFrom(us->Sock, &src_addr, &src_port, buf, buf_size);
if (size == 0) if (size == 0)
{ {
// Socket failure // Socket failure
@ -20724,6 +20733,8 @@ LABEL_FATAL_ERROR:
} }
Add(recv_list, p); Add(recv_list, p);
recv_list_total_size += size;
} }
stage_changed = true; stage_changed = true;
@ -20732,6 +20743,7 @@ LABEL_FATAL_ERROR:
} }
// Pass the received packet to the procedure // Pass the received packet to the procedure
// Print("recv_list_total_size = %u\n", recv_list_total_size);
u->RecvProc(u, recv_list); u->RecvProc(u, recv_list);
// Release the packet // Release the packet
@ -20758,6 +20770,8 @@ LABEL_FATAL_ERROR:
Zero(&last_src_ip, sizeof(IP)); Zero(&last_src_ip, sizeof(IP));
last_src_port = 0; last_src_port = 0;
// Print("LIST_NUM(u->SendPacketList) = %u\n", LIST_NUM(u->SendPacketList));
for (i = 0;i < LIST_NUM(u->SendPacketList);i++) for (i = 0;i < LIST_NUM(u->SendPacketList);i++)
{ {
UDPPACKET *p = LIST_DATA(u->SendPacketList, i); UDPPACKET *p = LIST_DATA(u->SendPacketList, i);
@ -21007,6 +21021,8 @@ UDPLISTENER *NewUdpListener(UDPLISTENER_RECV_PROC *recv_proc, void *param)
u = ZeroMalloc(sizeof(UDPLISTENER)); u = ZeroMalloc(sizeof(UDPLISTENER));
u->RecvBufSize = UDP_MAX_BUFFER_SIZE;
u->Param = param; u->Param = param;
u->PortList = NewList(NULL); u->PortList = NewList(NULL);

View File

@ -601,6 +601,7 @@ struct UDPLISTENER
bool IsEspRawPortOpened; // Whether the raw port opens bool IsEspRawPortOpened; // Whether the raw port opens
bool PollMyIpAndPort; // Examine whether the global IP and the port number of its own bool PollMyIpAndPort; // Examine whether the global IP and the port number of its own
QUERYIPTHREAD *GetNatTIpThread; // NAT-T IP address acquisition thread QUERYIPTHREAD *GetNatTIpThread; // NAT-T IP address acquisition thread
UINT RecvBufSize; // Receive buffer size
}; };
#define QUERYIPTHREAD_INTERVAL_LAST_OK (3 * 60 * 60 * 1000) #define QUERYIPTHREAD_INTERVAL_LAST_OK (3 * 60 * 60 * 1000)

Binary file not shown.

Binary file not shown.

View File

@ -4,7 +4,7 @@
/* File created by MIDL compiler version 7.00.0500 */ /* File created by MIDL compiler version 7.00.0500 */
/* at Mon Aug 16 00:27:28 2021 /* at Tue Aug 17 22:14:22 2021
*/ */
/* Compiler settings for .\vpnweb.idl: /* Compiler settings for .\vpnweb.idl:
Oicf, W1, Zp8, env=Win32 (32b run) Oicf, W1, Zp8, env=Win32 (32b run)

View File

@ -6,7 +6,7 @@
/* File created by MIDL compiler version 7.00.0500 */ /* File created by MIDL compiler version 7.00.0500 */
/* at Mon Aug 16 00:27:28 2021 /* at Tue Aug 17 22:14:22 2021
*/ */
/* Compiler settings for .\vpnweb.idl: /* Compiler settings for .\vpnweb.idl:
Oicf, W1, Zp8, env=Win32 (32b run) Oicf, W1, Zp8, env=Win32 (32b run)

View File

@ -4,7 +4,7 @@
/* File created by MIDL compiler version 7.00.0500 */ /* File created by MIDL compiler version 7.00.0500 */
/* at Mon Aug 16 00:27:28 2021 /* at Tue Aug 17 22:14:22 2021
*/ */
/* Compiler settings for .\vpnweb.idl: /* Compiler settings for .\vpnweb.idl:
Oicf, W1, Zp8, env=Win32 (32b run) Oicf, W1, Zp8, env=Win32 (32b run)