From: Sander Hoentjen Date: Thu, 11 Feb 2021 15:05:44 +0000 (+0100) Subject: dnsdist: add documentation about DNSQuestion:spoof X-Git-Tag: dnsdist-1.6.0-alpha2~43^2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63947cfbd81776528450fd144814f9e5389008a6;p=thirdparty%2Fpdns.git dnsdist: add documentation about DNSQuestion:spoof --- diff --git a/pdns/dnsdistdist/docs/reference/dq.rst b/pdns/dnsdistdist/docs/reference/dq.rst index 0bb048c569..c2b73071d7 100644 --- a/pdns/dnsdistdist/docs/reference/dq.rst +++ b/pdns/dnsdistdist/docs/reference/dq.rst @@ -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