From: FredericDT Date: Wed, 31 Aug 2022 01:54:04 +0000 (+0800) Subject: dnsdist: Commit TeeAction optional local parameter docs and console X-Git-Tag: rec-4.8.0-alpha1~36^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f59cffb8e123752073c15f3ccb6d44eda3abad8;p=thirdparty%2Fpdns.git dnsdist: Commit TeeAction optional local parameter docs and console keywords Signed-off-by: FredericDT --- diff --git a/pdns/dnsdist-console.cc b/pdns/dnsdist-console.cc index 40415a4ae3..70696b47cb 100644 --- a/pdns/dnsdist-console.cc +++ b/pdns/dnsdist-console.cc @@ -765,7 +765,7 @@ const std::vector g_consoleKeywords{ { "TagRule", true, "name [, value]", "matches if the tag named 'name' is present, with the given 'value' matching if any" }, { "TCAction", true, "", "create answer to query with TC and RD bits set, to move to TCP" }, { "TCPRule", true, "[tcp]", "Matches question received over TCP if tcp is true, over UDP otherwise" }, - { "TeeAction", true, "remote [, addECS]", "send copy of query to remote, optionally adding ECS info" }, + { "TeeAction", true, "remote [, addECS [, local]]", "send copy of query to remote, optionally adding ECS info, optionally set local address" }, { "testCrypto", true, "", "test of the crypto all works" }, { "TimedIPSetRule", true, "", "Create a rule which matches a set of IP addresses which expire"}, { "topBandwidth", true, "top", "show top-`top` clients that consume the most bandwidth over length of ringbuffer" }, diff --git a/pdns/dnsdistdist/docs/rules-actions.rst b/pdns/dnsdistdist/docs/rules-actions.rst index 9048266bfb..ee74a71943 100644 --- a/pdns/dnsdistdist/docs/rules-actions.rst +++ b/pdns/dnsdistdist/docs/rules-actions.rst @@ -1658,10 +1658,11 @@ The following actions exist. Before 1.7.0 this action was performed even when the query had been received over TCP, which required the use of :func:`TCPRule` to prevent the TC bit from being set over TCP transports. -.. function:: TeeAction(remote[, addECS]) +.. function:: TeeAction(remote[, addECS[, local]]) Send copy of query to ``remote``, keep stats on responses. If ``addECS`` is set to true, EDNS Client Subnet information will be added to the query. + If ``local`` has provided a value like "192.0.2.53", dnsdist will try binding that address as local address when sending the queries. Subsequent rules are processed after this action. :param string remote: An IP:PORT combination to send the copied queries to