diff --git a/server/pcaptxthread.cpp b/server/pcaptxthread.cpp index f428189..dc20bb8 100644 --- a/server/pcaptxthread.cpp +++ b/server/pcaptxthread.cpp @@ -432,6 +432,7 @@ int PcapTxThread::sendQueueTransmit(pcap_t *p, PacketSequence *seq, && ((stats_->pkts % seq->ttagPktInterval_) == 0)) { ttagPkt = true; *(pkt+pktLen-5) = SignProtocol::kTypeLenTtag; + *(pkt+pktLen-6) = ttagId_++; if (seq->ttagL4CksumOffset_) { quint16 *cksum = reinterpret_cast( pkt + seq->ttagL4CksumOffset_); @@ -467,6 +468,7 @@ int PcapTxThread::sendQueueTransmit(pcap_t *p, PacketSequence *seq, // Revert T-Tag packet changes if (ttagPkt) { *(pkt+pktLen-5) = SignProtocol::kTypeLenTtagPlaceholder; + *(pkt+pktLen-6) = 0; if (seq->ttagL4CksumOffset_) { quint16 *cksum = reinterpret_cast( pkt + seq->ttagL4CksumOffset_); diff --git a/server/pcaptxthread.h b/server/pcaptxthread.h index 4dec9bc..e941c71 100644 --- a/server/pcaptxthread.h +++ b/server/pcaptxthread.h @@ -93,6 +93,7 @@ private: StatsTuple *stats_; StatsTuple lastStats_; StreamStats streamStats_; + quint8 ttagId_{0}; double lastTxDuration_{0.0}; // in secs