]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
client: set default hostname to 127.0.0.1 instead of localhost
authorMiroslav Lichvar <mlichvar@redhat.com>
Fri, 16 May 2014 11:05:32 +0000 (13:05 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Fri, 16 May 2014 16:51:06 +0000 (18:51 +0200)
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.

chronyc.1.in
client.c

index 09d044a2e63c787849c016907952b0eb0e992d73..a7c91c77382c89639336689493f47ab5ad5f2f23 100644 (file)
@@ -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
index 37a0c508c7b35c6f5f835d9d551d8717772702dc..afae699f8bab14de063a6e058080dc5657acf328 100644 (file)
--- 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;