On Tue, Aug 18, 2020 at 09:58:56AM +0200, Sasha Romijn wrote:
> The current openrsync client is not able to connect to dual-stack remote 
> hosts, when the local host does not have any IPv4 connectivity. This is 
> because connect() fails with EADDRNOTAVAIL when trying to connect to the 
> remote IPv4 address on an IPv6-only local host - and IPv4 seems to be 
> attempted first. The current client does not try other remote host addresses 
> after EADDRNOTAVAIL, and therefore never tries the remote IPv6 address.
For openrsync(1) this won't happen with `family inet6 inet4' in
resolv.conf(5).

> The included patch allows the client to continue after EADDRNOTAVAIL, making 
> it to try other addresses, until it reaches a working IPv6 address. If the 
> local host is IPv6-only and the remote host IPv4-only, the connection still 
> fails with an error produced from rsync_connect().
Your diff reads correct to me, thanks; regular rsync(1) connects fine
regardless of `family'.

> Perhaps a warning should be issued for the EADDRNOTAVAIL case, like it does 
> for EHOSTUNREACH - but I thought it would be a bit much, as an IPv6-only host 
> would then emit warnings on pretty much every single use of the openrsync 
> client.
Yes, I don't think a warning is warrented here - afterall it can connect
without problems.

OK to commit anyone?

Reply via email to