aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2015-07-22 07:54:48 +0200
committerMichael Albinus2015-07-22 07:54:48 +0200
commit4f855d6fc9f675e2ad775e59ad30ea910b93d29c (patch)
tree772755766e4d5cd083314c2310982dcce2ab045a
parent5abadebc353cdb55a162a7f35a299623537cd3a8 (diff)
downloademacs-4f855d6fc9f675e2ad775e59ad30ea910b93d29c.tar.gz
emacs-4f855d6fc9f675e2ad775e59ad30ea910b93d29c.zip
Use 0.0.0.1 as test host in Tramp
* lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options): Use 0.0.0.1 as test host.
-rw-r--r--lisp/net/tramp-sh.el16
1 files changed, 6 insertions, 10 deletions
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index dbf46794a82..fbb5d8c6349 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -4614,19 +4614,15 @@ Gateway hops are already opened."
4614 (setq tramp-ssh-controlmaster-options "-o ControlMaster=auto"))) 4614 (setq tramp-ssh-controlmaster-options "-o ControlMaster=auto")))
4615 (unless (zerop (length tramp-ssh-controlmaster-options)) 4615 (unless (zerop (length tramp-ssh-controlmaster-options))
4616 (with-temp-buffer 4616 (with-temp-buffer
4617 ;; When we use a non-existing host name, we could run 4617 ;; We use a non-existing IP address, in order to avoid
4618 ;; into DNS timeouts. So we use "localhost" with an 4618 ;; useless connections, and DNS timeouts.
4619 ;; improper port, expecting nobody runs sshd on the
4620 ;; telnet port.
4621 (tramp-call-process 4619 (tramp-call-process
4622 vec "ssh" nil t nil 4620 vec "ssh" nil t nil "-o" "ControlPath=%C" "0.0.0.1")
4623 "-p" "23" "-o" "ControlPath=%C" "localhost")
4624 (goto-char (point-min)) 4621 (goto-char (point-min))
4625 (setq tramp-ssh-controlmaster-options 4622 (setq tramp-ssh-controlmaster-options
4626 (if (search-forward-regexp "unknown.+key" nil t) 4623 (concat tramp-ssh-controlmaster-options
4627 (concat tramp-ssh-controlmaster-options 4624 (if (search-forward-regexp "unknown.+key" nil t)
4628 " -o ControlPath='tramp.%%r@%%h:%%p'") 4625 " -o ControlPath='tramp.%%r@%%h:%%p'"
4629 (concat tramp-ssh-controlmaster-options
4630 " -o ControlPath='tramp.%%C'")))) 4626 " -o ControlPath='tramp.%%C'"))))
4631 (with-temp-buffer 4627 (with-temp-buffer
4632 (tramp-call-process vec "ssh" nil t nil "-o" "ControlPersist") 4628 (tramp-call-process vec "ssh" nil t nil "-o" "ControlPersist")