dns: convert transaction list to vecdeque

Allows for more efficient removal from front of the list.

Ticket: #5277
pull/7349/head
Jason Ish 4 years ago committed by Victor Julien
parent 7b11b4d3a1
commit 3189414788

@ -311,7 +311,7 @@ pub struct DNSState {
pub tx_id: u64,
// Transactions.
pub transactions: Vec<DNSTransaction>,
pub transactions: VecDeque<DNSTransaction>,
pub events: u16,
@ -401,7 +401,7 @@ impl DNSState {
let mut tx = self.new_tx();
tx.request = Some(request);
self.transactions.push(tx);
self.transactions.push_back(tx);
if z_flag {
SCLogDebug!("Z-flag set on DNS response");
@ -445,7 +445,7 @@ impl DNSState {
}
}
tx.response = Some(response);
self.transactions.push(tx);
self.transactions.push_back(tx);
if z_flag {
SCLogDebug!("Z-flag set on DNS response");

Loading…
Cancel
Save