Check and warn about stream stats for ICMP streams

Stream stats are not supportedd for ICMP packets
This commit is contained in:
Srivats P 2023-10-03 11:39:46 +05:30
parent 5581118e2f
commit 49cb7c40e0

View File

@ -684,6 +684,7 @@ bool StreamBase::preflightCheck(QStringList &result) const
bool chkShort = true;
bool chkTrunc = true;
bool chkJumbo = true;
bool chkSignIcmp = true;
int count = isFrameSizeVariable() ? frameSizeVariableCount() : 1;
for (int i = 0; i < count; i++)
@ -701,6 +702,17 @@ bool StreamBase::preflightCheck(QStringList &result) const
pass = false;
}
if (chkSignIcmp && hasProtocol(OstProto::Protocol::kSignFieldNumber)
&& hasProtocol(OstProto::Protocol::kIcmpFieldNumber))
{
result << QObject::tr("Stream statistics are not supported "
"for ICMP packets - please use a non-ICMP protocol or "
"remove special signature from ICMP streams");
chkSignIcmp = false;
pass = false;
}
if (chkTrunc && (pktLen < (frameProtocolLength(i) + kFcsSize)))
{
result << QObject::tr("One or more frames may be truncated - "