Martin Johansson
2000-Oct-10 21:53 UTC
[PATCH] X11 forwarding failure on later Linux dev kernels fix
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 {
Martin Johansson
2000-Oct-11 18:41 UTC
[PATCH] X11 forwarding failure on later Linux dev kernels fix
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 {
Damien Miller
2000-Oct-14 01:37 UTC
[PATCH] X11 forwarding failure on later Linux dev kernels fix
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.Thanks, applied. -d -- | ``The power of accurate observation is | Damien Miller <djm at mindrot.org> | commonly called cynicism by those who | @Work <djm at ibs.com.au> | have not got it'' - George Bernard Shaw | http://www.mindrot.org