bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#27009: 25.1; Tramp stuck on wrong host


From: Michael Albinus
Subject: bug#27009: 25.1; Tramp stuck on wrong host
Date: Mon, 22 May 2017 14:03:19 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

"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 via email to

[Prev in Thread] Current Thread [Next in Thread]