mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-26 11:29:53 +03:00
ACKing an empty LCP options list
This commit is contained in:
parent
9073452b09
commit
b9109211d3
@ -1088,9 +1088,14 @@ bool PPPProcessLCPRequestPacket(PPP_SESSION *p, PPP_PACKET *pp)
|
|||||||
USHORT NegotiatedMRU = PPP_UNSPECIFIED;
|
USHORT NegotiatedMRU = PPP_UNSPECIFIED;
|
||||||
// MSCHAPv2 code
|
// MSCHAPv2 code
|
||||||
UCHAR ms_chap_v2_code[3];
|
UCHAR ms_chap_v2_code[3];
|
||||||
|
|
||||||
|
UINT currentMagic = 0;
|
||||||
|
|
||||||
WRITE_USHORT(ms_chap_v2_code, PPP_LCP_AUTH_CHAP);
|
WRITE_USHORT(ms_chap_v2_code, PPP_LCP_AUTH_CHAP);
|
||||||
ms_chap_v2_code[2] = PPP_CHAP_ALG_MS_CHAP_V2;
|
ms_chap_v2_code[2] = PPP_CHAP_ALG_MS_CHAP_V2;
|
||||||
|
|
||||||
|
Debug("Got LCP packet request ID=%i OptionsListSize=%i\n", pp->Lcp->Id, LIST_NUM(pp->Lcp->OptionList));
|
||||||
|
|
||||||
for (i = 0; i < LIST_NUM(pp->Lcp->OptionList); i++)
|
for (i = 0; i < LIST_NUM(pp->Lcp->OptionList); i++)
|
||||||
{
|
{
|
||||||
PPP_OPTION *t = LIST_DATA(pp->Lcp->OptionList, i);
|
PPP_OPTION *t = LIST_DATA(pp->Lcp->OptionList, i);
|
||||||
@ -1792,6 +1797,12 @@ bool PPPAckLCPOptionsEx(PPP_SESSION *p, PPP_PACKET* pp, bool simulate)
|
|||||||
UINT i = 0;
|
UINT i = 0;
|
||||||
PPP_PACKET* ret;
|
PPP_PACKET* ret;
|
||||||
bool toBeACKed = false;
|
bool toBeACKed = false;
|
||||||
|
if (LIST_NUM(pp->Lcp->OptionList) == 0)
|
||||||
|
{
|
||||||
|
// We acknoweldge an empty option list
|
||||||
|
toBeACKed = true;
|
||||||
|
Debug("ACKing empty LCP options list, id=%i\n", pp->Lcp->Id);
|
||||||
|
}
|
||||||
for (i = 0; i < LIST_NUM(pp->Lcp->OptionList); i++)
|
for (i = 0; i < LIST_NUM(pp->Lcp->OptionList); i++)
|
||||||
{
|
{
|
||||||
PPP_OPTION *t = LIST_DATA(pp->Lcp->OptionList, i);
|
PPP_OPTION *t = LIST_DATA(pp->Lcp->OptionList, i);
|
||||||
@ -1826,7 +1837,7 @@ bool PPPAckLCPOptionsEx(PPP_SESSION *p, PPP_PACKET* pp, bool simulate)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LIST_NUM(ret->Lcp->OptionList) == 0 || simulate)
|
if (simulate)
|
||||||
{
|
{
|
||||||
FreePPPPacket(ret);
|
FreePPPPacket(ret);
|
||||||
return false;
|
return false;
|
||||||
|
@ -82,6 +82,7 @@
|
|||||||
// LCP Option Type
|
// LCP Option Type
|
||||||
#define PPP_LCP_OPTION_MRU 1
|
#define PPP_LCP_OPTION_MRU 1
|
||||||
#define PPP_LCP_OPTION_AUTH 3
|
#define PPP_LCP_OPTION_AUTH 3
|
||||||
|
#define PPP_LCP_OPTION_MAGIC 5
|
||||||
|
|
||||||
// IPCP option type
|
// IPCP option type
|
||||||
#define PPP_IPCP_OPTION_IP 3
|
#define PPP_IPCP_OPTION_IP 3
|
||||||
|
Loading…
Reference in New Issue
Block a user