mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-09-23 19:59:21 +03:00
Proto_OpenVPN: Set max allowed ACKs to 8 for P_ACK_V1
OpenVPN always allowed 8 ACKs in P_ACK_V1 packets but only used up to 4 in other control packets. Since Softether drops all packets with more than 4 ACKs it also drops legimate P_ACK_V1. See also this issue: https://github.com/schwabe/ics-openvpn/issues/1486
This commit is contained in:
@ -1902,6 +1902,10 @@ BUF *OvsBuildPacket(OPENVPN_PACKET *p)
|
||||
|
||||
// NumAck
|
||||
num_ack = MIN(p->NumAck, OPENVPN_MAX_NUMACK);
|
||||
if (p->OpCode != OPENVPN_P_ACK_V1)
|
||||
{
|
||||
num_ack = MIN(num_ack, OPENVPN_MAX_NUMACK_NONACK);
|
||||
}
|
||||
WriteBufChar(b, (UCHAR)num_ack);
|
||||
|
||||
if (p->NumAck >= 1)
|
||||
@ -1982,7 +1986,7 @@ OPENVPN_PACKET *OvsParsePacket(UCHAR *data, UINT size)
|
||||
|
||||
ret->NumAck = uc;
|
||||
|
||||
if (ret->NumAck > 4)
|
||||
if (ret->NumAck > OPENVPN_MAX_NUMACK)
|
||||
{
|
||||
goto LABEL_ERROR;
|
||||
}
|
||||
|
Reference in New Issue
Block a user