Skip to content

Commit 7f1d4b2

Browse files
committed
++ cache
1 parent 9daf2c1 commit 7f1d4b2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

storage/cache.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,10 @@ void NHTFlowCache::create_record(const Packet& packet, size_t flow_index, size_t
264264
}
265265
#ifdef WITH_CTT
266266
// if metadata are valid, add flow hash ctt to the flow record
267-
if (packet.cttmeta_valid) {
268-
m_flow_table[flow_index]->m_flow.flow_hash_ctt = packet.cttmeta.flow_hash;
267+
if (!packet.cttmeta_valid) {
268+
return;
269269
}
270+
m_flow_table[flow_index]->m_flow.flow_hash_ctt = packet.cttmeta.flow_hash;
270271
if (only_metadata_required(m_flow_table[flow_index]->m_flow)) {
271272
m_ctt_controller.create_record(m_flow_table[flow_index]->m_flow.flow_hash_ctt, m_flow_table[flow_index]->m_flow.time_first);
272273
m_flow_table[flow_index]->is_in_ctt = true;

0 commit comments

Comments
 (0)