From: Otto Moerbeek Date: Mon, 18 May 2020 12:40:00 +0000 (+0200) Subject: Merge pull request #8940 from pieterlexis/resolver-query-local-address6 X-Git-Tag: dnsdist-1.5.0-rc3~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=574ba7fa224f80b6965f9f29f090462be6f42416;p=thirdparty%2Fpdns.git Merge pull request #8940 from pieterlexis/resolver-query-local-address6 Merge query-local-address6 into query-local-address --- 574ba7fa224f80b6965f9f29f090462be6f42416 diff --cc pdns/pdns_recursor.cc index 0db01c9d34,96bdffd322..c209fc8160 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@@ -4946,19 -4798,10 +4918,19 @@@ int main(int argc, char **argv ::arg().set("socket-group","Group of socket")=""; ::arg().set("socket-mode", "Permissions for socket")=""; - ::arg().set("socket-dir",string("Where the controlsocket will live, ")+LOCALSTATEDIR+"/pdns-recursor when unset and not chrooted" )=""; + ::arg().set("socket-dir",string("Where the controlsocket will live, ")+LOCALSTATEDIR+"/pdns-recursor when unset and not chrooted" +#ifdef HAVE_SYSTEMD + + ". Set to the RUNTIME_DIRECTORY environment variable when that variable has a value (e.g. under systemd).")=""; + auto runtimeDir = getenv("RUNTIME_DIRECTORY"); + if (runtimeDir != nullptr) { + ::arg().set("socket-dir") = runtimeDir; + } +#else + )=""; +#endif ::arg().set("delegation-only","Which domains we only accept delegations from")=""; ::arg().set("query-local-address","Source IP address for sending queries")="0.0.0.0"; - ::arg().set("query-local-address6","Source IPv6 address for sending queries. IF UNSET, IPv6 WILL NOT BE USED FOR OUTGOING QUERIES")=""; + ::arg().set("query-local-address6","DEPRECATED: Use query-local-address for IPv6 as well. Source IPv6 address for sending queries. IF UNSET, IPv6 WILL NOT BE USED FOR OUTGOING QUERIES")=""; ::arg().set("client-tcp-timeout","Timeout in seconds when talking to TCP clients")="2"; ::arg().set("max-mthreads", "Maximum number of simultaneous Mtasker threads")="2048"; ::arg().set("max-tcp-clients","Maximum number of simultaneous TCP clients")="128";