mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-09 19:20:41 +03:00
Peer info optional in OvsParseKeyMethod2() (#355)
* Peer info optional in OvsParseKeyMethod2() Some OpenVPN clients (MikroTik router for example) do not send the peer info along with the key exchange. This patch makes the peer info string optional on the SoftEtherVPN side. * Fixed indentation
This commit is contained in:
parent
661c747a51
commit
e6099abe40
@ -1180,9 +1180,12 @@ UINT OvsParseKeyMethod2(OPENVPN_KEY_METHOD_2 *ret, UCHAR *data, UINT size, bool
|
|||||||
// String
|
// String
|
||||||
if (OvsReadStringFromBuf(b, ret->OptionString, sizeof(ret->OptionString)) &&
|
if (OvsReadStringFromBuf(b, ret->OptionString, sizeof(ret->OptionString)) &&
|
||||||
OvsReadStringFromBuf(b, ret->Username, sizeof(ret->Username)) &&
|
OvsReadStringFromBuf(b, ret->Username, sizeof(ret->Username)) &&
|
||||||
OvsReadStringFromBuf(b, ret->Password, sizeof(ret->Password)) &&
|
OvsReadStringFromBuf(b, ret->Password, sizeof(ret->Password)))
|
||||||
OvsReadStringFromBuf(b, ret->PeerInfo, sizeof(ret->PeerInfo)))
|
|
||||||
{
|
{
|
||||||
|
if (!OvsReadStringFromBuf(b, ret->PeerInfo, sizeof(ret->PeerInfo)))
|
||||||
|
{
|
||||||
|
Zero(ret->PeerInfo, sizeof(ret->PeerInfo));
|
||||||
|
}
|
||||||
read_size = b->Current;
|
read_size = b->Current;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user