emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 508049a: Change test for ControlPath in order to av


From: Michael Albinus
Subject: [Emacs-diffs] master 508049a: Change test for ControlPath in order to avoid DNS timeouts.
Date: Tue, 17 Mar 2015 09:18:21 +0000

branch: master
commit 508049aae95c42a3e6fe989ff403bf7cb6f88433
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    Change test for ControlPath in order to avoid DNS timeouts.
    
    Fixes: debbugs:20015
    
    * net/tramp-sh.el (tramp-ssh-controlmaster-options): Change test
    for ControlPath in order to avoid DNS timeouts.
---
 lisp/ChangeLog       |    5 +++++
 lisp/net/tramp-sh.el |    8 ++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index cbd1bce..9647822 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-17  Michael Albinus  <address@hidden>
+
+       * net/tramp-sh.el (tramp-ssh-controlmaster-options): Change test
+       for ControlPath in order to avoid DNS timeouts.  (Bug#20015)
+
 2015-03-16  Alan Mackenzie  <address@hidden>
 
        Edebug: Allow "S" to work during trace mode.  Fixes debbugs #20074.
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 73ad8c7..b6c47bc 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -4565,7 +4565,7 @@ Gateway hops are already opened."
 
     ;; In case the host name is not used for the remote shell
     ;; command, the user could be misguided by applying a random
-    ;; hostname.
+    ;; host name.
     (let* ((v (car target-alist))
           (method (tramp-file-name-method v))
           (host (tramp-file-name-host v)))
@@ -4611,9 +4611,13 @@ Gateway hops are already opened."
                (setq tramp-ssh-controlmaster-options "-o ControlMaster=auto")))
            (unless (zerop (length tramp-ssh-controlmaster-options))
              (with-temp-buffer
+               ;; When we use a non-existing host name, we could run
+               ;; into DNS timeouts.  So we use "localhost" with an
+               ;; improper port, expecting nobody runs sshd on the
+               ;; telnet port.
                (tramp-call-process
                 vec "ssh" nil t nil
-                "-o" "ControlPath=%C" "host.does.not.exist")
+                "-p" "23" "-o" "ControlPath=%C" "localhost")
                (goto-char (point-min))
                (setq tramp-ssh-controlmaster-options
                      (if (search-forward-regexp "unknown.+key" nil t)



reply via email to

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