From: Eric Leblond Date: Mon, 23 Jan 2023 19:03:12 +0000 (+0100) Subject: dns: add TX orientation X-Git-Tag: suricata-6.0.11~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1af87709f0794be576677cad2d5764c1a4508ea;p=thirdparty%2Fsuricata.git dns: add TX orientation Set no inspection in the opposite side of the transaction. Ticket: #5799 --- diff --git a/rust/src/dns/dns.rs b/rust/src/dns/dns.rs index f2f9761edc..ace6d0a394 100644 --- a/rust/src/dns/dns.rs +++ b/rust/src/dns/dns.rs @@ -24,6 +24,8 @@ use std::collections::HashMap; use std::collections::VecDeque; use crate::applayer::*; +use crate::core::STREAM_TOCLIENT; +use crate::core::STREAM_TOSERVER; use crate::core::{self, AppProto, ALPROTO_UNKNOWN, IPPROTO_UDP, IPPROTO_TCP}; use crate::dns::parser; @@ -507,6 +509,7 @@ impl DNSState { let mut tx = self.new_tx(); tx.request = Some(request); + tx.tx_data.set_inspect_direction(STREAM_TOSERVER); self.transactions.push(tx); if z_flag { @@ -551,6 +554,7 @@ impl DNSState { } } tx.response = Some(response); + tx.tx_data.set_inspect_direction(STREAM_TOCLIENT); self.transactions.push(tx); if z_flag {