mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-22 17:39:53 +03:00
Merge PR #683: resolve several issues found by coverity
This commit is contained in:
commit
0871c0b5d2
@ -3700,7 +3700,7 @@ bool HubPaPutPacket(SESSION *s, void *data, UINT size)
|
|||||||
pa->Now = Tick64();
|
pa->Now = Tick64();
|
||||||
|
|
||||||
// Processing of Adjust TCP MSS
|
// Processing of Adjust TCP MSS
|
||||||
if (hub->Option != NULL && hub->Option->DisableAdjustTcpMss == false && s != NULL)
|
if (hub != NULL && hub->Option != NULL && hub->Option->DisableAdjustTcpMss == false && s != NULL)
|
||||||
{
|
{
|
||||||
UINT target_mss = (hub->Option->AdjustTcpMssValue == 0 ? INFINITE : hub->Option->AdjustTcpMssValue);
|
UINT target_mss = (hub->Option->AdjustTcpMssValue == 0 ? INFINITE : hub->Option->AdjustTcpMssValue);
|
||||||
UINT session_mss = (s->AdjustMss == 0 ? INFINITE : s->AdjustMss);
|
UINT session_mss = (s->AdjustMss == 0 ? INFINITE : s->AdjustMss);
|
||||||
|
@ -541,16 +541,8 @@ UINT CalcEtherIPTcpMss(ETHERIP_SERVER *s)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s->L2TPv3 == false)
|
// EtherIP, L2TPv3
|
||||||
{
|
ret -= 2;
|
||||||
// EtherIP
|
|
||||||
ret -= 2;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// L2TPv3
|
|
||||||
ret -= 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ethernet
|
// Ethernet
|
||||||
ret -= 14;
|
ret -= 14;
|
||||||
|
@ -1661,10 +1661,7 @@ OPENVPN_PACKET *OvsParsePacket(UCHAR *data, UINT size)
|
|||||||
|
|
||||||
LABEL_ERROR:
|
LABEL_ERROR:
|
||||||
Debug("OvsParsePacket Error.\n");
|
Debug("OvsParsePacket Error.\n");
|
||||||
if (ret != NULL)
|
OvsFreePacket(ret);
|
||||||
{
|
|
||||||
OvsFreePacket(ret);
|
|
||||||
}
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user