diff options
| author | Michael Albinus | 2015-03-17 10:18:10 +0100 |
|---|---|---|
| committer | Michael Albinus | 2015-03-17 10:18:10 +0100 |
| commit | 508049aae95c42a3e6fe989ff403bf7cb6f88433 (patch) | |
| tree | 31f3dc6476a291cddb08e7ae89251273569c6f0b | |
| parent | b0743354e5502395f9a64b534a5ff5579c64ed42 (diff) | |
| download | emacs-508049aae95c42a3e6fe989ff403bf7cb6f88433.tar.gz emacs-508049aae95c42a3e6fe989ff403bf7cb6f88433.zip | |
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.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/net/tramp-sh.el | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cbd1bce25e8..96478223d49 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2015-03-17 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * net/tramp-sh.el (tramp-ssh-controlmaster-options): Change test | ||
| 4 | for ControlPath in order to avoid DNS timeouts. (Bug#20015) | ||
| 5 | |||
| 1 | 2015-03-16 Alan Mackenzie <acm@muc.de> | 6 | 2015-03-16 Alan Mackenzie <acm@muc.de> |
| 2 | 7 | ||
| 3 | Edebug: Allow "S" to work during trace mode. Fixes debbugs #20074. | 8 | 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 73ad8c7e4ef..b6c47bcb7bb 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -4565,7 +4565,7 @@ Gateway hops are already opened." | |||
| 4565 | 4565 | ||
| 4566 | ;; In case the host name is not used for the remote shell | 4566 | ;; In case the host name is not used for the remote shell |
| 4567 | ;; command, the user could be misguided by applying a random | 4567 | ;; command, the user could be misguided by applying a random |
| 4568 | ;; hostname. | 4568 | ;; host name. |
| 4569 | (let* ((v (car target-alist)) | 4569 | (let* ((v (car target-alist)) |
| 4570 | (method (tramp-file-name-method v)) | 4570 | (method (tramp-file-name-method v)) |
| 4571 | (host (tramp-file-name-host v))) | 4571 | (host (tramp-file-name-host v))) |
| @@ -4611,9 +4611,13 @@ Gateway hops are already opened." | |||
| 4611 | (setq tramp-ssh-controlmaster-options "-o ControlMaster=auto"))) | 4611 | (setq tramp-ssh-controlmaster-options "-o ControlMaster=auto"))) |
| 4612 | (unless (zerop (length tramp-ssh-controlmaster-options)) | 4612 | (unless (zerop (length tramp-ssh-controlmaster-options)) |
| 4613 | (with-temp-buffer | 4613 | (with-temp-buffer |
| 4614 | ;; When we use a non-existing host name, we could run | ||
| 4615 | ;; into DNS timeouts. So we use "localhost" with an | ||
| 4616 | ;; improper port, expecting nobody runs sshd on the | ||
| 4617 | ;; telnet port. | ||
| 4614 | (tramp-call-process | 4618 | (tramp-call-process |
| 4615 | vec "ssh" nil t nil | 4619 | vec "ssh" nil t nil |
| 4616 | "-o" "ControlPath=%C" "host.does.not.exist") | 4620 | "-p" "23" "-o" "ControlPath=%C" "localhost") |
| 4617 | (goto-char (point-min)) | 4621 | (goto-char (point-min)) |
| 4618 | (setq tramp-ssh-controlmaster-options | 4622 | (setq tramp-ssh-controlmaster-options |
| 4619 | (if (search-forward-regexp "unknown.+key" nil t) | 4623 | (if (search-forward-regexp "unknown.+key" nil t) |