]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: add documentation about DNSQuestion:spoof
authorSander Hoentjen <shoentjen@antagonist.nl>
Thu, 11 Feb 2021 15:05:44 +0000 (16:05 +0100)
committerSander Hoentjen <shoentjen@antagonist.nl>
Thu, 11 Feb 2021 15:08:45 +0000 (16:08 +0100)
pdns/dnsdistdist/docs/reference/dq.rst

index 0bb048c569afc0337f5fdd4c8b74db8339a584ed..c2b73071d7d3b217316c692fbf12a2b0cbc380ed 100644 (file)
@@ -241,6 +241,17 @@ This state can be modified from the various hooks.
     :param string tail: The new data
     :returns: true if the operation succeeded, false otherwise
 
+  .. method:: DNSQuestion:spoof(ip|ips|raw|raws)
+
+    .. versionadded:: 1.6.0
+
+    Forge a response with the specified record data as raw bytes. If you specify list of raws (it is assumed they match the query type), all will get spoofed in.
+
+    :param ComboAddress ip: The `ComboAddress` to be spoofed, e.g. `newCA("192.0.2.1")`.
+    :param table ComboAddresses ips: The `ComboAddress`es to be spoofed, e.g. `{ newCA("192.0.2.1"), newCA("192.0.2.2") }`.
+    :param string raw: The raw string to be spoofed, e.g. `"\\192\\000\\002\\001"`.
+    :param table raws: The raw strings to be spoofed, e.g. `{ "\\192\\000\\002\\001", "\\192\\000\\002\\002" }`.
+
 .. _DNSResponse:
 
 DNSResponse object