]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #4906: Fix trace n-tuple for rebuilt packet.
authorOleksii Shumeiko -X (oshumeik - SOFTSERVE INC at Cisco) <oshumeik@cisco.com>
Wed, 17 Sep 2025 08:19:26 +0000 (08:19 +0000)
committerOleksii Shumeiko -X (oshumeik - SOFTSERVE INC at Cisco) <oshumeik@cisco.com>
Wed, 17 Sep 2025 08:19:26 +0000 (08:19 +0000)
Merge in SNORT/snort3 from ~OSHUMEIK/snort3:trace_ntuple_pdu to master

Squashed commit of the following:

commit a9d670044b9f086ab2793e13ea1d19ddc48caae4
Author: Oleksii Shumeiko <oshumeik@cisco.com>
Date:   Mon Sep 15 11:23:46 2025 +0300

    trace: print n-tuple for other packet types with IP layer set

    IP layer (and addresses) can be set not only for pure TCP and UDP.

src/trace/trace_loggers.cc

index b5a21e88b94caf931dd02bbc34ea684f304e9d42..bee95d3abe153bb1ed8ea96d1c60df7c90ca2247 100644 (file)
@@ -38,7 +38,7 @@ using namespace snort;
 
 static std::string get_ntuple(bool ntuple, const Packet* p)
 {
-    if ( !ntuple or !p or !p->has_ip() )
+    if ( !ntuple or !p or !p->ptrs.ip_api.is_valid() )
         return "";
 
     SfIpString src_addr;