Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/SoftEtherVPN/SoftEtherVPN_Stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordnobori <da.git@softether.co.jp>2015-01-30 16:30:34 +0300
committerdnobori <da.git@softether.co.jp>2015-01-30 16:30:34 +0300
commit06a72040a347e567bec560e3426e5ccddcf785c5 (patch)
tree4f6c27e5ee5ab118621b78bc583ac15110a681fa /src/Cedar/Protocol.c
parent75f9836ce5f0a1dea2c3fe304bbc26c962ee64bf (diff)
v4.13-9522-beta
Diffstat (limited to 'src/Cedar/Protocol.c')
-rw-r--r--src/Cedar/Protocol.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/Cedar/Protocol.c b/src/Cedar/Protocol.c
index 7599a28b..6648be26 100644
--- a/src/Cedar/Protocol.c
+++ b/src/Cedar/Protocol.c
@@ -1596,6 +1596,16 @@ bool ServerAccept(CONNECTION *c)
goto CLEANUP;
}
+ if (hub->ForceDisableComm)
+ {
+ // Commnunication function is disabled
+ FreePack(p);
+ c->Err = ERR_SERVER_CANT_ACCEPT;
+ error_detail = "ERR_COMM_DISABLED";
+ ReleaseHub(hub);
+ goto CLEANUP;
+ }
+
if (GetGlobalServerFlag(GSF_DISABLE_AC) == 0)
{
if (hub->HubDb != NULL && c->FirstSock != NULL)
@@ -2974,8 +2984,11 @@ bool ServerAccept(CONNECTION *c)
if (s->UseUdpAcceleration)
{
+ bool no_nat_t = false;
+
+
// Initialize the UDP acceleration function
- s->UdpAccel = NewUdpAccel(c->Cedar, (c->FirstSock->IsRUDPSocket ? NULL : &c->FirstSock->LocalIP), false, c->FirstSock->IsRUDPSocket, false);
+ s->UdpAccel = NewUdpAccel(c->Cedar, (c->FirstSock->IsRUDPSocket ? NULL : &c->FirstSock->LocalIP), false, c->FirstSock->IsRUDPSocket, no_nat_t);
if (s->UdpAccel == NULL)
{
s->UseUdpAcceleration = false;
@@ -6039,6 +6052,8 @@ bool ServerDownloadSignature(CONNECTION *c, char **error_detail_str)
while (true)
{
+ bool not_found_error = false;
+
num++;
if (num > max)
{
@@ -6082,6 +6097,8 @@ bool ServerDownloadSignature(CONNECTION *c, char **error_detail_str)
}
+
+
// Interpret
if (StrCmpi(h->Method, "POST") == 0)
{
@@ -6107,7 +6124,7 @@ bool ServerDownloadSignature(CONNECTION *c, char **error_detail_str)
return false;
}
// Check the Target
- if (StrCmpi(h->Target, vpn_http_target) != 0)
+ if ((StrCmpi(h->Target, vpn_http_target) != 0) || not_found_error)
{
// Target is invalid
HttpSendNotFound(s, h->Target);