diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2022-05-22 20:12:27 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2022-05-22 21:56:40 +0200 |
| commit | d2b3400f79ffaed3357650307376ab69a7ec3b1b (patch) | |
| tree | 1b531c135fea77d60de3df5408be1500d6a720c9 /gnu/tests | |
| parent | 52aceda4fd61970db118f23d316784ea8df244e8 (diff) | |
services: openssh: Listen on both IPv4 and IPv6.
Fixes <https://issues.guix.gnu.org/55335>.
Reported by Christopher Baines <mail@cbaines.net>.
* gnu/services/ssh.scm (openssh-shepherd-service)[inetd-style?]: New variable.
<start>: Use it. When using 'make-inetd-constructor', pass a list of
endpoints as is possible with the Shepherd 0.9.1.
<stop>: Adjust accordingly.
* gnu/tests/ssh.scm (run-ssh-test)["wait for port 22"]: Rename to...
["wait for port 22, IPv4"]: ... this.
["wait for port 22, IPv6"]: New test.
Diffstat (limited to 'gnu/tests')
| -rw-r--r-- | gnu/tests/ssh.scm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gnu/tests/ssh.scm b/gnu/tests/ssh.scm index e3dd6016032..3f550db5eac 100644 --- a/gnu/tests/ssh.scm +++ b/gnu/tests/ssh.scm | |||
| @@ -136,9 +136,19 @@ root with an empty password." | |||
| 136 | (= pid (wait-for-file #$pid-file marionette)) | 136 | (= pid (wait-for-file #$pid-file marionette)) |
| 137 | pid))) | 137 | pid))) |
| 138 | 138 | ||
| 139 | (test-assert "wait for port 22" | 139 | (test-assert "wait for port 22, IPv4" |
| 140 | (wait-for-tcp-port 22 marionette)) | 140 | (wait-for-tcp-port 22 marionette)) |
| 141 | 141 | ||
| 142 | (test-assert "wait for port 22, IPv6" | ||
| 143 | ;; Make sure it's also available as IPv6. | ||
| 144 | ;; See <https://issues.guix.gnu.org/55335>. | ||
| 145 | (wait-for-tcp-port 22 marionette | ||
| 146 | #:address | ||
| 147 | `(make-socket-address | ||
| 148 | AF_INET6 | ||
| 149 | (inet-pton AF_INET6 "::1") | ||
| 150 | 22))) | ||
| 151 | |||
| 142 | ;; Connect to the guest over SSH. Make sure we can run a shell | 152 | ;; Connect to the guest over SSH. Make sure we can run a shell |
| 143 | ;; command there. | 153 | ;; command there. |
| 144 | (test-equal "shell command" | 154 | (test-equal "shell command" |
