From: Pieter Lexis Date: Wed, 24 Feb 2016 13:20:01 +0000 (+0100) Subject: dnsdist: allow setting server IP with -c X-Git-Tag: rec-4.0.0-alpha2~25^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=094b6aff50529623f7289160c5761e4e29e9cabc;p=thirdparty%2Fpdns.git dnsdist: allow setting server IP with -c This will allow you to connect to any dnsdist server by setting the IP on the commandline --- diff --git a/docs/manpages/dnsdist.1.md b/docs/manpages/dnsdist.1.md index 003e81c86c..fb74fab6a2 100644 --- a/docs/manpages/dnsdist.1.md +++ b/docs/manpages/dnsdist.1.md @@ -52,8 +52,10 @@ Server for example is often mentioned. for errors. dnsdist will show the errors and exit with a non-zero exit-code when errors are found. --c,--client -: Operate as a client, connect to dnsdist. +-c,--client [*ADDRESS*[:*PORT*]] +: Operate as a client, connect to dnsdist. This will read the dnsdist configuration + for the **controlSocket** statement and connect to it. When *ADDRESS* (with + optional *PORT*) is set, dnsdist will connect to that instead. -d,--daemon : Operate as a daemon. diff --git a/pdns/dnsdist.cc b/pdns/dnsdist.cc index 7f588b7b0e..0b2a73cb50 100644 --- a/pdns/dnsdist.cc +++ b/pdns/dnsdist.cc @@ -1199,6 +1199,7 @@ try } #endif + ComboAddress clientAddress = ComboAddress(); g_cmdLine.config=SYSCONFDIR "/dnsdist.conf"; struct option longopts[]={ {"acl", required_argument, 0, 'a'}, @@ -1245,13 +1246,15 @@ try case 'h': cout<<"dnsdist "<