]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
ike: add TX orientation
authorEric Leblond <el@stamus-networks.com>
Mon, 23 Jan 2023 19:03:35 +0000 (20:03 +0100)
committerVictor Julien <vjulien@oisf.net>
Fri, 31 Mar 2023 17:30:07 +0000 (19:30 +0200)
Set no inspection in the opposite side of the transaction.

Ticket: #5799

rust/src/ike/ike.rs
rust/src/ike/ikev1.rs
rust/src/ike/ikev2.rs

index e715fa7bf9c9304f4f24c162743206b98a71955e..997348053e1428dcb61a96ed0b89a795d85b9192 100644 (file)
@@ -113,7 +113,7 @@ pub struct IKETransaction {
     pub errors: u32,
 
     logged: LoggerFlags,
-    tx_data: applayer::AppLayerTxData,
+    pub tx_data: applayer::AppLayerTxData,
 }
 
 impl Transaction for IKETransaction {
index e8b58eb728741426ebd3325ebc3bdd75757a28b3..18d586ac4ecc65b20e80d1eaaee4c85053998f89 100644 (file)
@@ -78,6 +78,7 @@ pub fn handle_ikev1(
 
     tx.ike_version = 1;
     tx.direction = direction;
+    tx.tx_data.set_inspect_direction(direction);
     tx.hdr.spi_initiator = format!("{:016x}", isakmp_header.init_spi);
     tx.hdr.spi_responder = format!("{:016x}", isakmp_header.resp_spi);
     tx.hdr.maj_ver = isakmp_header.maj_ver;
index cd2e5518122491c830a3e1f5a9152bdac45eee3a..6e3640d25791beed234b0cac30ffa15df78d888f 100644 (file)
@@ -117,6 +117,7 @@ pub fn handle_ikev2(
     tx.ike_version = 2;
     // use init_spi as transaction identifier
     // tx.xid = hdr.init_spi; todo is this used somewhere?
+    tx.tx_data.set_inspect_direction(direction);
     tx.hdr.ikev2_header = hdr.clone();
     tx.hdr.spi_initiator = format!("{:016x}", isakmp_header.init_spi);
     tx.hdr.spi_responder = format!("{:016x}", isakmp_header.resp_spi);