enclose IPv6 address with brackets for rsync

Unlike ssh, rsync expects IPv6 addresses to be enclosed in brackets.

Compared to IPv4, IPv6 addresses rarely change which makes
automation more predictable and generally easier; especially
useful when debugging graphical issues.

As a special and even better case, IPv6 *link-local* addresses
never ever change and do not require any kind of network server or
configuration. They are always available even on isolated,
ad-hoc networks and direct back-to-back connections.

TEST=Use IPv6 addresses as the --remote argument, for instance:
./ --remote fe80::20e:c6ff:fe88:ffa7%eth0

Change-Id: Ic5d30b1a81c7c8aed35ecaa439c8767fbe61f443
Signed-off-by: Marc Herbert <>
Reviewed-by: Mike Frysinger <>
1 file changed