Skip to content
This repository has been archived by the owner on Apr 14, 2024. It is now read-only.

Commit

Permalink
Check and warn about stream stats for ICMP streams
Browse files Browse the repository at this point in the history
Stream stats are not supportedd for ICMP packets
  • Loading branch information
pstavirs committed Oct 3, 2023
1 parent 5581118 commit 49cb7c4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions common/streambase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
Expand All @@ -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 - "
Expand Down

0 comments on commit 49cb7c4

Please sign in to comment.