* [gentoo-portage-dev] [PATCH] rsync: proxychains compatibility (bug 693026)
@ 2019-08-28 17:52 Zac Medico
0 siblings, 0 replies; only message in thread
From: Zac Medico @ 2019-08-28 17:52 UTC (permalink / raw
To: gentoo-portage-dev; +Cc: Zac Medico
Use the original hostname if it resolves to a single IP, since DNS
lookup must occur in the rsync process for compatibility with things
like proxychains that allocate a surrogate IP which is only valid
within the current process.
Bug: https://bugs.gentoo.org/693026
Signed-off-by: Zac Medico <zmedico@gentoo.org>
---
lib/portage/sync/modules/rsync/rsync.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lib/portage/sync/modules/rsync/rsync.py b/lib/portage/sync/modules/rsync/rsync.py
index e6f2688f8..a40e1c854 100644
--- a/lib/portage/sync/modules/rsync/rsync.py
+++ b/lib/portage/sync/modules/rsync/rsync.py
@@ -283,6 +283,13 @@ class RsyncSync(NewBase):
# With some configurations we need to use the plain hostname
# rather than try to resolve the ip addresses (bug #340817).
uris.append(syncuri)
+ elif len(uris) == 1:
+ # Use the original hostname if it resolves to a single IP,
+ # since DNS lookup must occur in the rsync process for
+ # compatibility with things like proxychains that allocate
+ # a surrogate IP which is only valid within the current
+ # process.
+ uris = [syncuri]
# reverse, for use with pop()
uris.reverse()
--
2.21.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-08-28 17:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-28 17:52 [gentoo-portage-dev] [PATCH] rsync: proxychains compatibility (bug 693026) Zac Medico
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox