]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #4237: trace: Replace colon delimiter for tenant with whitespace in...
authorVitalii Tron -X (vtron - SOFTSERVE INC at Cisco) <vtron@cisco.com>
Thu, 21 Mar 2024 14:33:44 +0000 (14:33 +0000)
committerSteve Chew (stechew) <stechew@cisco.com>
Thu, 21 Mar 2024 14:33:44 +0000 (14:33 +0000)
Merge in SNORT/snort3 from ~VTRON/snort3:trace_tenant_format to master

Squashed commit of the following:

commit df874033ba82d3915710cb65bf020a09244d931f
Author: Vitalii Tron <vtron@cisco.com>
Date:   Thu Mar 7 02:45:44 2024 -0500

    trace: Replace colon delimiter for tenant with whitespace in the trace_logger output

src/trace/trace_loggers.cc

index fb4402218922d416a0e98e298d75f95e21c55370..cbc73f364daf074d55f30f609eded2b907dd55ef 100644 (file)
@@ -57,15 +57,14 @@ static std::string get_ntuple(bool ntuple, const Packet* p)
     }
 
     ss << src_addr << " " << src_port << " -> " << dst_addr << " " << dst_port << " ";
-    ss << unsigned(p->get_ip_proto_next()) << " ";
-    ss << "AS=" << p->pkth->address_space_id << ":";
+    ss << unsigned(p->get_ip_proto_next());
+    ss << " AS=" << p->pkth->address_space_id;
 
     if (p->pkth->tenant_id)
-        ss << "TN=" << p->pkth->tenant_id<< ":";
+        ss << " TN=" << p->pkth->tenant_id;
 
-    const auto vni = p->get_flow_geneve_vni();
-    if (vni)
-        ss << "VNI=" << vni<< ":";
+    // Delimits the header part and the trace message
+    ss << " ";
 
     return ss.str();
 }