GNU bug report logs - #55335
openssh-service no longer listens on IPv6

Previous Next

Package: guix;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Mon, 9 May 2022 10:46:01 UTC

Severity: important

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #19 received at 55335 <at> debbugs.gnu.org (full text, mbox):

From: Jack Hill <jackhill <at> jackhill.us>
To: Christopher Baines <mail <at> cbaines.net>
Cc: 55335 <at> debbugs.gnu.org
Subject: Re: bug#55335: [PATCH] services: Allow shepherd to listen for IPv6
 connections to openssh.
Date: Fri, 13 May 2022 11:25:51 -0400 (EDT)
On Fri, 13 May 2022, Jack Hill wrote:

> Thanks for looking into this! Does this fix work for you (I assume so)? I 
> tried a simpler patch to use a v6 socket:
>
>
> --- a/gnu/services/ssh.scm
> +++ b/gnu/services/ssh.scm
> @@ -535,7 +535,7 @@ (define openssh-command
>          (start #~(if (defined? 'make-inetd-constructor)
>                       (make-inetd-constructor
>                        (append #$openssh-command '("-i"))
> -                       (make-socket-address AF_INET INADDR_ANY
> +                       (make-socket-address AF_INET6 INADDR_ANY
>                                             #$port-number)
>                        #:max-connections #$max-connections)
>                       (make-forkexec-constructor #$openssh-command
>
> and that does indeed produce a v6 socket that also accepts v4 connection. The 
> output of `ss -tulpen`:
>
> tcp       LISTEN     0          10 *:22                       *:* 
> users:(("shepherd",pid=1,fd=29)) ino:1522146 sk:2001 cgroup:/ v6only:0 <->
>
> However, while ssh is now able to connect to the socket, something is going 
> wrong in the handoff to sshd. I see the following message printed on the 
> console when trying to connect:
>
> Uncaught exception in task:
> In fibers.scm:
>  150:8 4 (_)
> In shepherd/service.scm:
>  1435:21 3 (_)
>  1280:30 2 (socket-address->string #(10 # 37896 0 0))
> In unknown file:
>          1 (inet-ntop 2 42540578165178177408896616697074944157)
> In ice-9/boot-9.scm:
>  1685:16 0 (raise-exception _ #:continualbe? _)
> ice-9/boot-9.scm:1685:16: In procecure raise-exception:
> Value our of range 0 to 18446744073709551615: 
> 42540578165178177408896616697074944157
>
> Best,
> Jack

I should have specified: now neither v4 or v6 work.

Best,
Jack




This bug report was last modified 2 years and 359 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.