1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-07-07 00:04:57 +03:00

Merge PR #1008: Adding RADIUS and L3 MAC address fixing function, with small bug-fixes

This commit is contained in:
Davide Beatrici
2019-10-19 19:37:21 +02:00
committed by GitHub
19 changed files with 246 additions and 61 deletions

View File

@ -19947,6 +19947,10 @@ void FlushTubeFlushList(TUBE_FLUSH_LIST *f)
// The server receives a PACK from the client
PACK *HttpServerRecv(SOCK *s)
{
return HttpServerRecvEx(s, 0);
}
PACK *HttpServerRecvEx(SOCK *s, UINT max_data_size)
{
BUF *b;
PACK *p;
@ -19955,6 +19959,7 @@ PACK *HttpServerRecv(SOCK *s)
UCHAR *tmp;
HTTP_VALUE *v;
UINT num_noop = 0;
if (max_data_size == 0) max_data_size = HTTP_PACK_MAX_SIZE;
// Validate arguments
if (s == NULL)
{
@ -19985,7 +19990,7 @@ START:
}
size = GetContentLength(h);
if (size == 0 || size > HTTP_PACK_MAX_SIZE)
if (size == 0 || (size > max_data_size))
{
FreeHttpHeader(h);
goto BAD_REQUEST;

View File

@ -969,6 +969,7 @@ bool HttpSendNotImplemented(SOCK *s, char *method, char *target, char *version);
bool HttpServerSend(SOCK *s, PACK *p);
bool HttpClientSend(SOCK *s, PACK *p);
PACK *HttpServerRecv(SOCK *s);
PACK *HttpServerRecvEx(SOCK *s, UINT max_data_size);
PACK *HttpClientRecv(SOCK *s);
bool GetIPViaDnsProxyForJapanFlets(IP *ip_ret, char *hostname, bool ipv6, UINT timeout, bool *cancel, char *dns_proxy_hostname);