Skip to content

Commit

Permalink
v4.38-9760-rtm
Browse files Browse the repository at this point in the history
  • Loading branch information
dnobori committed Aug 17, 2021
1 parent 005285b commit 3fa9303
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 20 deletions.
12 changes: 6 additions & 6 deletions src/Cedar/Cedar.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@


// Version number
#define CEDAR_VER 437
#define CEDAR_VER 438

// Build Number
#define CEDAR_BUILD 9758
#define CEDAR_BUILD 9760

// Beta number
//#define BETA_NUMBER 3
Expand All @@ -150,10 +150,10 @@
// Specifies the build date
#define BUILD_DATE_Y 2021
#define BUILD_DATE_M 8
#define BUILD_DATE_D 16
#define BUILD_DATE_HO 0
#define BUILD_DATE_MI 27
#define BUILD_DATE_SE 11
#define BUILD_DATE_D 17
#define BUILD_DATE_HO 22
#define BUILD_DATE_MI 14
#define BUILD_DATE_SE 6

// Tolerable time difference
#define ALLOW_TIMESTAMP_DIFF (UINT64)(3 * 24 * 60 * 60 * 1000)
Expand Down
12 changes: 6 additions & 6 deletions src/Cedar/IPsec_IKE.c
Original file line number Diff line number Diff line change
Expand Up @@ -1484,13 +1484,13 @@ void SendInformationalExchangePacketEx(IKE_SERVER *ike, IKE_CLIENT *c, IKE_PACKE

IkeSendUdpPacket(ike, IKE_UDP_TYPE_ISAKMP, &c->ServerIP, c->ServerPort,
&c->ClientIP, c->ClientPort,
ps_buf->Buf, ps_buf->Size);
Clone(ps_buf->Buf, ps_buf->Size), ps_buf->Size);

#ifdef RAW_DEBUG
IkeDebugUdpSendRawPacket(ps);
#endif // RAW_DEBUG

Free(ps_buf);
FreeBuf(ps_buf);

IkeFree(ps);
}
Expand Down Expand Up @@ -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,
&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
Expand Down Expand Up @@ -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,
&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
Expand Down
8 changes: 4 additions & 4 deletions src/CurrentBuild.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BUILD_NUMBER 9758
VERSION 437
BUILD_NAME beta
BUILD_DATE 20210816_002711
BUILD_NUMBER 9760
VERSION 438
BUILD_NAME rtm
BUILD_DATE 20210817_221406
18 changes: 17 additions & 1 deletion src/Mayaqua/Network.c
Original file line number Diff line number Diff line change
Expand Up @@ -20448,6 +20448,7 @@ void UdpListenerThread(THREAD *thread, void *param)
while (u->Halt == false)
{
LIST *recv_list;
UINT recv_list_total_size = 0;
UINT64 now = Tick64();
UINT interval;
bool stage_changed = false;
Expand Down Expand Up @@ -20621,6 +20622,7 @@ void UdpListenerThread(THREAD *thread, void *param)
stage_changed = false;

recv_list = NewListFast(NULL);
recv_list_total_size = 0;

if (u->PollMyIpAndPort)
{
Expand Down Expand Up @@ -20670,8 +20672,15 @@ void UdpListenerThread(THREAD *thread, void *param)
IP src_addr;
UINT src_port;
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)
{
// Socket failure
Expand Down Expand Up @@ -20724,6 +20733,8 @@ void UdpListenerThread(THREAD *thread, void *param)
}

Add(recv_list, p);

recv_list_total_size += size;
}

stage_changed = true;
Expand All @@ -20732,6 +20743,7 @@ void UdpListenerThread(THREAD *thread, void *param)
}

// Pass the received packet to the procedure
// Print("recv_list_total_size = %u\n", recv_list_total_size);
u->RecvProc(u, recv_list);

// Release the packet
Expand All @@ -20758,6 +20770,8 @@ void UdpListenerThread(THREAD *thread, void *param)
Zero(&last_src_ip, sizeof(IP));
last_src_port = 0;

// Print("LIST_NUM(u->SendPacketList) = %u\n", LIST_NUM(u->SendPacketList));

for (i = 0;i < LIST_NUM(u->SendPacketList);i++)
{
UDPPACKET *p = LIST_DATA(u->SendPacketList, i);
Expand Down Expand Up @@ -21007,6 +21021,8 @@ UDPLISTENER *NewUdpListener(UDPLISTENER_RECV_PROC *recv_proc, void *param)

u = ZeroMalloc(sizeof(UDPLISTENER));

u->RecvBufSize = UDP_MAX_BUFFER_SIZE;

u->Param = param;

u->PortList = NewList(NULL);
Expand Down
1 change: 1 addition & 0 deletions src/Mayaqua/Network.h
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@ struct UDPLISTENER
bool IsEspRawPortOpened; // Whether the raw port opens
bool PollMyIpAndPort; // Examine whether the global IP and the port number of its own
QUERYIPTHREAD *GetNatTIpThread; // NAT-T IP address acquisition thread
UINT RecvBufSize; // Receive buffer size
};

#define QUERYIPTHREAD_INTERVAL_LAST_OK (3 * 60 * 60 * 1000)
Expand Down
Binary file modified src/bin/vpnweb.cab
Binary file not shown.
Binary file modified src/bin/vpnweb.ocx
Binary file not shown.
2 changes: 1 addition & 1 deletion src/vpnweb/vpnweb.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


/* 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:
Oicf, W1, Zp8, env=Win32 (32b run)
Expand Down
2 changes: 1 addition & 1 deletion src/vpnweb/vpnweb_i.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


/* 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:
Oicf, W1, Zp8, env=Win32 (32b run)
Expand Down
2 changes: 1 addition & 1 deletion src/vpnweb/vpnweb_p.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


/* 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:
Oicf, W1, Zp8, env=Win32 (32b run)
Expand Down

0 comments on commit 3fa9303

Please sign in to comment.