mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-07-12 02:34:59 +03:00
Cedar: move buffer limit handling from ProtoHandleConnection() to protocol implementation
This allows greater control, required by SSTP: the limit only applies to data packets.
This commit is contained in:
@ -23,8 +23,7 @@ PROTO_IMPL *OvsGetProtoImpl()
|
||||
OvsName,
|
||||
OvsIsPacketForMe,
|
||||
OvsProcessData,
|
||||
OvsProcessDatagrams,
|
||||
OvsBufferLimit,
|
||||
OvsProcessDatagrams
|
||||
};
|
||||
|
||||
return &impl;
|
||||
@ -185,6 +184,8 @@ bool OvsProcessData(void *param, TCP_RAW_DATA *in, FIFO *out)
|
||||
return false;
|
||||
}
|
||||
|
||||
server->SupressSendPacket = FifoSize(out) > MAX_BUFFERING_PACKET_SIZE;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -229,16 +230,6 @@ bool OvsProcessDatagrams(void *param, LIST *in, LIST *out)
|
||||
return true;
|
||||
}
|
||||
|
||||
void OvsBufferLimit(void *param, const bool reached)
|
||||
{
|
||||
if (param == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
((OPENVPN_SERVER *)param)->SupressSendPacket = reached;
|
||||
}
|
||||
|
||||
// Write the OpenVPN log
|
||||
void OvsLog(OPENVPN_SERVER *s, OPENVPN_SESSION *se, OPENVPN_CHANNEL *c, char *name, ...)
|
||||
{
|
||||
|
Reference in New Issue
Block a user