From b8e0fca1c4d488403c3a61dde058183b222dd7fe Mon Sep 17 00:00:00 2001 From: Samir Aguiar Date: Thu, 5 Jun 2025 13:21:48 +0000 Subject: [PATCH] dnsdist: use "replace" instead of "overwrite" --- pdns/dnsdistdist/dnsdist-response-actions-definitions.yml | 2 +- pdns/dnsdistdist/docs/reference/actions.rst | 2 +- regression-tests.dnsdist/test_Responses.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pdns/dnsdistdist/dnsdist-response-actions-definitions.yml b/pdns/dnsdistdist/dnsdist-response-actions-definitions.yml index 17f20ee2b3..d04f2c7036 100644 --- a/pdns/dnsdistdist/dnsdist-response-actions-definitions.yml +++ b/pdns/dnsdistdist/dnsdist-response-actions-definitions.yml @@ -173,7 +173,7 @@ The function will be invoked in a per-thread Lua state, without access to the gl default: true description: "A list of ``name``=``key`` pairs, for meta-data to be added to Protocol Buffer message" - name: "SetEDNSOption" - description: "Add arbitrary EDNS option and data to the response. Any existing EDNS content with the same option code will be overwritten. Subsequent rules are processed after this action" + description: "Add arbitrary EDNS option and data to the response. Any existing EDNS content with the same option code will be replaced. Subsequent rules are processed after this action" parameters: - name: "code" type: "u32" diff --git a/pdns/dnsdistdist/docs/reference/actions.rst b/pdns/dnsdistdist/docs/reference/actions.rst index 31b74c2031..41b4c2f20f 100644 --- a/pdns/dnsdistdist/docs/reference/actions.rst +++ b/pdns/dnsdistdist/docs/reference/actions.rst @@ -597,7 +597,7 @@ The following actions exist. .. versionadded:: 1.9.11 - Add arbitrary EDNS option and data to the response. Any existing EDNS content with the same option code will be overwritten. + Add arbitrary EDNS option and data to the response. Any existing EDNS content with the same option code will be replaced. Subsequent rules are processed after this action. :param int option: The EDNS option number diff --git a/regression-tests.dnsdist/test_Responses.py b/regression-tests.dnsdist/test_Responses.py index 13d4e99cef..846ce29545 100644 --- a/regression-tests.dnsdist/test_Responses.py +++ b/regression-tests.dnsdist/test_Responses.py @@ -605,7 +605,7 @@ class TestAdvancedSetEDNSOptionResponseAction(DNSDistTest): def testAdvancedSetEDNSOptionResponseOverwrite(self): """ - Responses: Set EDNS Option in response overwrites existing option + Responses: Set EDNS Option in response replaces existing option """ name = 'setednsoptionresponse-overwrite.responses.tests.powerdns.com.' initialECO = cookiesoption.CookiesOption(b'aaaaaaaa', b'bbbbbbbb') @@ -619,9 +619,9 @@ class TestAdvancedSetEDNSOptionResponseAction(DNSDistTest): '127.0.0.1') response.answer.append(rrset) - overWrittenECO = cookiesoption.CookiesOption(b'deadbeef', b'deadc0de') + replacementECO = cookiesoption.CookiesOption(b'deadbeef', b'deadc0de') expectedResponse = dns.message.make_response(query) - expectedResponse.use_edns(edns=True, payload=512, options=[overWrittenECO]) + expectedResponse.use_edns(edns=True, payload=512, options=[replacementECO]) expectedResponse.answer.append(rrset) for method in ("sendUDPQuery", "sendTCPQuery"): -- 2.47.2