[PATCH] X11 forwarding failure on later Linux dev kernels fix

Martin Johansson fatbob at acc.umu.se
Thu Oct 12 05:41:06 EST 2000


I resend the patch since I noticed that the first one was corrupted by my
mail prog. I also forgot to mention that the version of OpenSSH in
question is 2.2.0p1.

Regards
/Martin

On Tue, 10 Oct 2000, Martin Johansson wrote:
> Hi!
> 
> The return values from socket() changed from EINVAL to EAFNOTSUPPORT for
> not supported address family in Linux 2.4.0-test8. This small patch fixes
> the 'error: socket: Address family not supported by protocol' and
> 'Disconnecting: Command terminated on signal 11.' when enabling X11
> forwarding.
> 
> Cheers
> /Martin Johansson
> 


--- openssh-2.2.0p1-orig/channels.c	Wed Aug 23 00:46:24 2000
+++ openssh-2.2.0p1/channels.c	Tue Oct 10 21:22:14 2000
@@ -1740,7 +1740,7 @@
 				continue;
 			sock = socket(ai->ai_family, SOCK_STREAM, 0);
 			if (sock < 0) {
-				if (errno != EINVAL) {
+				if (errno != EINVAL && errno != EAFNOSUPPORT) {
 					error("socket: %.100s", strerror(errno));
 					return NULL;
 				} else {






More information about the openssh-unix-dev mailing list