From: Miroslav Lichvar Date: Fri, 16 May 2014 11:05:32 +0000 (+0200) Subject: client: set default hostname to 127.0.0.1 instead of localhost X-Git-Tag: 1.30-pre1~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3de72917c3d458bec38b3dda11eda873ad5c3fda;p=thirdparty%2Fchrony.git client: set default hostname to 127.0.0.1 instead of localhost This is to make sure chronyd will see the remote address as 127.0.0.1 and allow access even when localhost resolves to an address of a non-loopback interface. --- diff --git a/chronyc.1.in b/chronyc.1.in index 09d044a2..a7c91c77 100644 --- a/chronyc.1.in +++ b/chronyc.1.in @@ -24,7 +24,7 @@ A summary of the options supported by \fBchronyc\fR is included below. .TP \fB\-h\fR \fIhostname\fR -specify hostname +specify hostname (default 127.0.0.1) .TP \fB\-p\fR \fIport-number\fR specify port-number diff --git a/client.c b/client.c index 37a0c508..afae699f 100644 --- a/client.c +++ b/client.c @@ -2729,7 +2729,7 @@ main(int argc, char **argv) { char *line; const char *progname = argv[0]; - const char *hostname = "localhost"; + const char *hostname = "127.0.0.1"; const char *conf_file = DEFAULT_CONF_FILE; int quit = 0, ret = 1, multi = 0, auto_auth = 0, short_timeout = 1; int port = DEFAULT_CANDM_PORT;