]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Rename option to TRACEPARENT
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 27 Jan 2026 13:36:30 +0000 (14:36 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 27 Jan 2026 13:38:43 +0000 (14:38 +0100)
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
pdns/ednsoptions.hh
pdns/protozero-trace.cc
pdns/recursordist/pdns_recursor.cc
pdns/recursordist/rec-tcp.cc
pdns/recursordist/recpacketcache.cc
pdns/sdig.cc

index b629382a670993a305e8ccb6264de5317945d31e..39d7666c208e3ef163f0488823b1dfbde1f7c366 100644 (file)
@@ -27,7 +27,7 @@
 struct EDNSOptionCode
 {
   // Temporary code assigned for OpenTelemetry TraceID and SpanID
-  enum EDNSOptionCodeEnum : uint16_t {NSID=3, DAU=5, DHU=6, N3U=7, ECS=8, EXPIRE=9, COOKIE=10, TCPKEEPALIVE=11, PADDING=12, CHAIN=13, KEYTAG=14, EXTENDEDERROR=15, OTTRACEIDS=65500};
+  enum EDNSOptionCodeEnum : uint16_t {NSID=3, DAU=5, DHU=6, N3U=7, ECS=8, EXPIRE=9, COOKIE=10, TCPKEEPALIVE=11, PADDING=12, CHAIN=13, KEYTAG=14, EXTENDEDERROR=15, TRACEPARENT=65500};
 };
 
 /* extract the position (relative to the optRR pointer!) and size of a specific EDNS0 option from a pointer on the beginning rdLen of the OPT RR */
index e28a4bef0496729529278682f612a954e0c229d4..132f1d1e7859782fe461e25c10eed3a22e0b593f 100644 (file)
@@ -574,7 +574,7 @@ bool extractOTraceIDs(const EDNSOptionViewMap& map, EDNSOptionCode::EDNSOptionCo
 {
   EDNSOptionCode::EDNSOptionCodeEnum realEOC = eoc;
   if (realEOC == 0) {
-    realEOC = EDNSOptionCode::OTTRACEIDS;
+    realEOC = EDNSOptionCode::TRACEPARENT;
   }
   bool traceidset = false;
   if (const auto& option = map.find(realEOC); option != map.end()) {
index bac19de8474f1c7a46f1249a77d2b37d0ee4c9e2..a8b47c07a29b4e97000bf2b8d961dc22bfbb727a 100644 (file)
@@ -2298,7 +2298,7 @@ static string* doProcessUDPQuestion(const std::string& question, const ComboAddr
         ecsParsed = true;
 
         if (SyncRes::eventTraceEnabled(SyncRes::event_trace_to_ot)) {
-          bool ednsFound = pdns::trace::extractOTraceIDs(ednsOptions, EDNSOptionCode::OTTRACEIDS, otTrace);
+          bool ednsFound = pdns::trace::extractOTraceIDs(ednsOptions, EDNSOptionCode::TRACEPARENT, otTrace);
           if (!matchOTConditions(eventTrace, t_OTConditions, mappedSource, qname, qtype, ntohs(headerdata->id), ednsFound) && SyncRes::eventTraceEnabledOnly(SyncRes::event_trace_to_ot)) {
             eventTrace.setEnabled(false);
           }
index 1b9f30557215da8c9db36661a038036ec932f9b1..ce5eba01fc08d46a6057f091c78bac13f20bf5ea 100644 (file)
@@ -341,7 +341,7 @@ static void doProcessTCPQuestion(std::unique_ptr<DNSComboWriter>& comboWriter, s
       qnameParsed = true;
 
       if (SyncRes::eventTraceEnabled(SyncRes::event_trace_to_ot)) {
-        bool ednsFound = pdns::trace::extractOTraceIDs(ednsOptions, EDNSOptionCode::OTTRACEIDS, comboWriter->d_otTrace);
+        bool ednsFound = pdns::trace::extractOTraceIDs(ednsOptions, EDNSOptionCode::TRACEPARENT, comboWriter->d_otTrace);
         if (SyncRes::eventTraceEnabledOnly(SyncRes::event_trace_to_ot) && !matchOTConditions(comboWriter->d_eventTrace, t_OTConditions, comboWriter->d_mappedSource, qname, qtype, ntohs(comboWriter->d_mdp.d_header.id), ednsFound)) {
           comboWriter->d_eventTrace.setEnabled(false);
         }
index 149a23a040b8a4986c58012a3a6f4dab7fe314d0..ec99fe58f5f27c55ace62929c0974c7011ea50cd 100644 (file)
@@ -103,7 +103,7 @@ uint64_t RecursorPacketCache::doWipePacketCache(const DNSName& name, uint16_t qt
   return count;
 }
 
-static const std::unordered_set<uint16_t> s_skipOptions = {EDNSOptionCode::ECS, EDNSOptionCode::COOKIE, EDNSOptionCode::OTTRACEIDS};
+static const std::unordered_set<uint16_t> s_skipOptions = {EDNSOptionCode::ECS, EDNSOptionCode::COOKIE, EDNSOptionCode::TRACEPARENT};
 
 bool RecursorPacketCache::qrMatch(const packetCache_t::index<HashTag>::type::iterator& iter, const std::string& queryPacket, const DNSName& qname, uint16_t qtype, uint16_t qclass)
 {
index 34fd0f8cfdb936e042a0e269d23b512e9a6114fd..d96b83099f37d2d8df1c86455f04ad2f692d41da 100644 (file)
@@ -105,7 +105,7 @@ static void fillPacket(vector<uint8_t>& packet, const string& q, const string& t
       record.setTraceID(traceid);
       record.setSpanID(spanid);
       record.setFlags(flags);
-      opts.emplace_back(EDNSOptionCode::OTTRACEIDS, std::string_view(reinterpret_cast<const char*>(data.data()), data.size())); // NOLINT
+      opts.emplace_back(EDNSOptionCode::TRACEPARENT, std::string_view(reinterpret_cast<const char*>(data.data()), data.size())); // NOLINT
     }
     pw.addOpt(bufsize, 0, dnssec ? EDNSOpts::DNSSECOK : 0, opts);
     pw.commit();