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

Martin Johansson fatbob at acc.umu.se
Wed Oct 11 08:53:34 EST 2000


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


--- channels.c.orig     Wed Aug 23 00:46:24 2000
+++ 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