]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: SpoofAction: clarify what gets spoofed 16800/head
authorChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Sun, 1 Feb 2026 15:04:49 +0000 (16:04 +0100)
committerChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Sun, 1 Feb 2026 15:08:09 +0000 (16:08 +0100)
Signed-off-by: Chris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
pdns/dnsdistdist/dnsdist-actions-factory.cc

index 8fa0e6fc6f0c056ba637b4a3b25c4f49b38ba285..befe201d00cb3f73d14b2ba830d36991463b908b 100644 (file)
@@ -901,15 +901,21 @@ public:
 
   string toString() const override
   {
-    string ret = "spoof in ";
+    string ret = "spoof ";
     if (!d_cname.empty()) {
-      ret += d_cname.toString() + " ";
+      ret += "CNAME " + d_cname.toString() + " ";
     }
     if (!d_rawResponses.empty()) {
       ret += "raw bytes ";
     }
     else {
       for (const auto& addr : d_addrs) {
+        if (addr.isIPv4()) {
+          ret += "A ";
+        }
+        else if (addr.isIPv6()) {
+          ret += "AAAA ";
+        }
         ret += addr.toString() + " ";
       }
     }