Bug 1675 - rsync cannot cope with literal IPv6 addresses
Summary: rsync cannot cope with literal IPv6 addresses
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 2.6.9
Hardware: x86 Linux
: P3 normal (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL: http://bugs.gentoo.org/show_bug.cgi?i...
Depends on:
Reported: 2004-08-28 05:12 UTC by Bernhard Schmidt
Modified: 2007-02-05 14:06 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Schmidt 2004-08-28 05:12:44 UTC
While rsync works quite fine using IPv6 transport layer when using hostnames 
with AAAA records there seems to be no way to specify a literal IPv6 address on 
the command line 
$ rsync -6 --recursive rsync://rsync.de.gentoo.org/gentoo-portage . 
Welcome to ftp.join.uni-muenster.de, JOINs IPv6 FTP server. 
$ rsync -6 --recursive rsync://[2001:638:500:101::21]/gentoo-portage . 
rsync: getaddrinfo: [2001 638: Name or service not known 
$ rsync --version 
rsync  version 2.6.2  protocol version 28 
Doesn't work with 2.6.3pre1 also
Comment 1 Wayne Davison 2004-09-17 09:54:53 UTC
A fix for this is now in CVS.  Thanks for the report.
Comment 2 Luke-Jr 2007-02-05 12:25:39 UTC
This is still a problem as of rsync 2.6.9. I cannot specify an IPv6 literal, eg:
rsync /test [fe80::1]:/test

Please reopen.
Comment 3 Wayne Davison 2007-02-05 13:08:38 UTC
This works just fine for me using rsync 2.6.9 and ssh:

rsync -avv '[::1]':src /dest

(My shell requires the quotes to avoid an error about the wild-cards not matching anything.)

Use double-verbose to see what remote-shell command rsync is executing, and then diagnose why that doesn't work for you.
Comment 4 Luke-Jr 2007-02-05 13:19:35 UTC
ok, it seems to only happen if I specify a username:

luke-jr@yokochan ~ $ rsync test luke-jr@'[::1]':/tmp
rsync: getaddrinfo: [ 873: Name or service not known
rsync error: error in socket IO (code 10) at clientserver.c(104) [sender=2.6.9]
Comment 5 Wayne Davison 2007-02-05 14:00:58 UTC
Rsync currently requires the name to be inside the brackets:

rsync test '[luke-jr@::1]':/tmp

(Some shells don't require the quotes.)

I'll look into changing that for 3.0.0.
Comment 6 Luke-Jr 2007-02-05 14:06:01 UTC
That works, if odd syntax. It would be nice if I didn't need brackets too:
rsync test luke-jr@::1:/tmp