From 3e680603104c9e8eb7fb8271178f2b8a2adee182 Mon Sep 17 00:00:00 2001 From: Chris Hofstaedtler Date: Sun, 1 Feb 2026 16:04:49 +0100 Subject: [PATCH] dnsdist: SpoofAction: clarify what gets spoofed Signed-off-by: Chris Hofstaedtler --- pdns/dnsdistdist/dnsdist-actions-factory.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pdns/dnsdistdist/dnsdist-actions-factory.cc b/pdns/dnsdistdist/dnsdist-actions-factory.cc index 8fa0e6fc6f..befe201d00 100644 --- a/pdns/dnsdistdist/dnsdist-actions-factory.cc +++ b/pdns/dnsdistdist/dnsdist-actions-factory.cc @@ -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() + " "; } } -- 2.47.3