]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: The PP mock backend has to copy the response before editing it
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 12 May 2025 10:16:37 +0000 (12:16 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 12 May 2025 10:16:37 +0000 (12:16 +0200)
regression-tests.dnsdist/proxyprotocolutils.py

index 9d0021911be59fd8706a5f403a0e989690e78b1a..4f7659fee2b354dd6b33644927a11c82ea462442 100644 (file)
@@ -43,7 +43,7 @@ def ProxyProtocolUDPResponder(port, fromQueue, toQueue):
         toQueue.put([payload, dnsData], True, 2.0)
         # computing the correct ID for the response
         request = dns.message.from_wire(dnsData)
-        response = fromQueue.get(True, 2.0)
+        response = copy.deepcopy(fromQueue.get(True, 2.0))
         response.id = request.id
 
         sock.settimeout(2.0)