Subject: Re: kernel option for "socket: Protocol not supported"
To: Ignatios Souvatzis <is@netbsd.org>
From: mouss <usebsd@free.fr>
List: tech-security
Date: 02/22/2006 19:43:48
Ignatios Souvatzis a écrit :
> 
> I've looked at the code - IMHO there is a clean one-line patch:
> 
> RCS file: /cvsroot/src/crypto/dist/ssh/sshconnect.c,v
> retrieving revision 1.31
> diff -u -r1.31 sshconnect.c
> --- sshconnect.c        23 Apr 2005 16:53:29 -0000      1.31
> +++ sshconnect.c        22 Feb 2006 10:29:20 -0000
> @@ -188,7 +188,7 @@
>         }
>         sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
>         if (sock < 0)
> -               error("socket: %.100s", strerror(errno));
> +               debug("socket: %.100s", strerror(errno));
>  
>         /* Bind the socket to an alternative local IP address */
>         if (options.bind_address == NULL)
> 
> Note that the last setting of errno is printed after the for loop in the 
> function ssh_connect(), anyway - see line 395, so if _no_ address has a
> supported address family, the user would be notified.
> 

why not use a similar code for all clients (ssh, telnet, ...)?