mirror of https://github.com/FreeRDP/FreeRDP
proxy: Fix handling of in drdynvc DATA_FIRST_PDU in proxy
During tests I sometimes received DATA_FIRST_PDUs that were not part of a fragmented message but contained a complete PDU. The documentation is not quite clear about if this is a possible scenario or a protocol violation. However in the description of the Data field it says: If the sum of the DVC header size and the value specified by the Length field is less than 1600 bytes, then the actual data length equals the value specified by the Length field. This hints that DATA_FIRST_PDU might also contain complete Data and does not necessarily mean to be the first part of a fragmented PDU.
This commit is contained in:
parent
b44810418b
commit
e4f476fce4
|
@ -406,13 +406,6 @@ static PfChannelResult DynvcTrackerPeekFn(ChannelStateTracker* tracker, BOOL fir
|
|||
trackerState->CurrentDataReceived, trackerState->currentDataLength);
|
||||
return PF_CHANNEL_RESULT_ERROR;
|
||||
}
|
||||
|
||||
if (trackerState->CurrentDataReceived == trackerState->currentDataLength)
|
||||
{
|
||||
trackerState->currentDataLength = 0;
|
||||
trackerState->CurrentDataFragments = 0;
|
||||
trackerState->CurrentDataReceived = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -421,6 +414,13 @@ static PfChannelResult DynvcTrackerPeekFn(ChannelStateTracker* tracker, BOOL fir
|
|||
}
|
||||
}
|
||||
|
||||
if (trackerState->CurrentDataReceived == trackerState->currentDataLength)
|
||||
{
|
||||
trackerState->currentDataLength = 0;
|
||||
trackerState->CurrentDataFragments = 0;
|
||||
trackerState->CurrentDataReceived = 0;
|
||||
}
|
||||
|
||||
switch (dynChannel->channelMode)
|
||||
{
|
||||
case PF_UTILS_CHANNEL_PASSTHROUGH:
|
||||
|
|
Loading…
Reference in New Issue