From: Zac Medico <zmedico@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Cc: Zac Medico <zmedico@gentoo.org>
Subject: [gentoo-portage-dev] [PATCH] rsync: proxychains compatibility (bug 693026)
Date: Wed, 28 Aug 2019 10:52:53 -0700 [thread overview]
Message-ID: <20190828175253.11489-1-zmedico@gentoo.org> (raw)
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
reply other threads:[~2019-08-28 17:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190828175253.11489-1-zmedico@gentoo.org \
--to=zmedico@gentoo.org \
--cc=gentoo-portage-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox