Bugzilla – Attachment 2888 Details for
Bug 2636
Fix X11 forwarding, when ::1 is not configured
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
When bind returns AEDDRNOTAVAIL, continue with next address
x11v6.patch.txt (text/plain), 1.02 KB, created by
Tomas Kuthan
on 2016-11-10 01:48:01 AEDT
(
hide
)
Description:
When bind returns AEDDRNOTAVAIL, continue with next address
Filename:
MIME Type:
Creator:
Tomas Kuthan
Created:
2016-11-10 01:48:01 AEDT
Size:
1.02 KB
patch
obsolete
>From 77ae9af0758961b43a29ffd20048ded697ed3a19 Mon Sep 17 00:00:00 2001 >From: Tomas Kuthan <tkuthan@gmail.com> >Date: Mon, 7 Nov 2016 16:58:05 +0100 >Subject: [PATCH] Fix X11 forwarding, when ::1 is not configured > >When binding to address of one family failed with EADDRNOTAVAIL, it is OK >to move on to the next family as returned by getaddrinfo. >--- > channels.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > >diff --git a/channels.c b/channels.c >index bef8ad6..9b5d108 100644 >--- a/channels.c >+++ b/channels.c >@@ -4278,6 +4278,16 @@ x11_create_display_inet(int x11_display_offset, int x11_use_localhost, > if (x11_use_localhost) > channel_set_reuseaddr(sock); > if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) { >+ /* >+ * If bind() fails with EADDRNOTAVAIL, we >+ * should not break immediately but rather >+ * try the next address available. >+ */ >+ if (errno == EADDRNOTAVAIL) { >+ close(sock); >+ continue; >+ } >+ > debug2("bind port %d: %.100s", port, strerror(errno)); > close(sock); > >-- >2.7.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 2636
: 2888