all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: "Devon Sean McCullough" <Emacs-Hacker2017@jovi.net>
Cc: 27009@debbugs.gnu.org
Subject: bug#27009: 25.1; Tramp stuck on wrong host
Date: Mon, 22 May 2017 14:03:19 +0200	[thread overview]
Message-ID: <87lgppxfnc.fsf@detlef> (raw)
In-Reply-To: <5c849bc3ef1078e5244a8fabc5677551.squirrel@leaf.websitewelcome.com> (Devon Sean McCullough's message of "Sun, 21 May 2017 05:12:07 -0500")

"Devon Sean McCullough" <Emacs-Hacker2017@jovi.net> writes:

Hi Davon,

> Tramp connects to the wrong host -- the user may not notice, leading to
> devastating damage.

Tramp is almost agnostic to port numbers. It uses them for the command
raised for connecting, but everywhere else it ignores them. This happens
especially in managing internal data, like the name of the connection
buffer or access to cached values.

As a result, two remote file names are handled as identical if they
differ only in their port numbers. See also the todo entry in tramp.el:

;; * Use also port to distinguish connections.  This is needed for
;;   different hosts sitting behind a single router (distinguished by
;;   different port numbers).  (Tzvi Edelman)

I know, this is not satisfying. If time permits, I'll work on this next
time. Unfortunately, there's no trivial fix.

As a workaround, use different host names. In your example, you could
use something like

(let ((one "/scp:localhost#11111:")
      (two "/scp:localhost.#22222:"))

Name resolution for "localhost" and "localhost." will return the same IP
address. But from the Tramp pov, the host names are different strings.

Best regards, Michael.





  reply	other threads:[~2017-05-22 12:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-21 10:12 bug#27009: 25.1; Tramp stuck on wrong host Devon Sean McCullough
2017-05-22 12:03 ` Michael Albinus [this message]
     [not found]   ` <0BE42352-D06B-4466-A898-5B3EF5436428@csail.mit.edu>
     [not found]     ` <87a864uiba.fsf@detlef>
2017-05-24 14:28       ` Michael Albinus
2017-05-24 17:22         ` Glenn Morris
2017-05-24 20:31           ` Michael Albinus
2017-06-07 12:41             ` Devon Sean McCullough
2017-06-07 14:26               ` Michael Albinus
2017-07-14 13:19                 ` Michael Albinus

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=87lgppxfnc.fsf@detlef \
    --to=michael.albinus@gmx.de \
    --cc=27009@debbugs.gnu.org \
    --cc=Emacs-Hacker2017@jovi.net \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.