client: reconnect with multiple addresses

Allow multiple hostnames/addresses separated by comma to be specified
with the -h option. Hostnames are resolved to up to 16 addresses. When
connecting to an address fails or no reply is received, try the next
address in the list.

Set the default value for the -h option to 127.0.0.1,::1.
This commit is contained in:
Miroslav Lichvar
2015-08-19 10:19:13 +02:00
parent 7079ca2718
commit 0cc8f68754
4 changed files with 140 additions and 44 deletions

View 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 (default 127.0.0.1)
specify hostname or comma-separated list of addresses (default 127.0.0.1,::1)
.TP
\fB\-p\fR \fIport-number\fR
specify port-number