Skip to content

Commit fcb2011

Browse files
committed
++ cache
1 parent e033155 commit fcb2011

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

storage/cache.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ void NHTFlowCache::flush(Packet &pkt, size_t flow_index, int return_flags)
200200

201201
if (return_flags == ProcessPlugin::FlowAction::FLUSH_WITH_REINSERT) {
202202
#ifdef WITH_CTT
203-
if (m_flow_table[flow_index]->is_in_ctt) {
203+
if (m_flow_table[flow_index]->is_in_ctt && !m_flow_table[flow_index]->is_waiting_for_export) {
204204
m_flow_table[flow_index]->is_waiting_for_export = true;
205205
send_export_request_to_ctt(m_flow_table[flow_index]->m_flow.flow_hash_ctt);
206206
}
@@ -458,7 +458,7 @@ int NHTFlowCache::put_pkt(Packet &pkt)
458458
row_span.advance_flow_to(victim_index, m_new_flow_insert_index);
459459
flow_index = row_begin + m_new_flow_insert_index;
460460
#ifdef WITH_CTT
461-
if (m_flow_table[flow_index.value()]->is_in_ctt){
461+
if (m_flow_table[flow_index.value()]->is_in_ctt && !m_flow_table[flow_index.value()]->is_waiting_for_export) {
462462
m_flow_table[flow_index.value()]->is_waiting_for_export = true;
463463
send_export_request_to_ctt(m_flow_table[flow_index.value()]->m_flow.flow_hash_ctt);
464464
m_flow_table[flow_index.value()]->export_time = {pkt.ts.tv_sec + 1, pkt.ts.tv_usec};

0 commit comments

Comments
 (0)