Bugzilla – Attachment 3044 Details for
Bug 2143
X11 forwarding for ipv4 is broken when ipv6 is disabled on the loopback interface
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
generally skip throwing away opened sockets on EADDRNOTAVAIL
openssh-X_forward_with_disabled_ipv6.patch (text/plain), 1.04 KB, created by
Petr Cerny [:hrosik]
on 2017-08-30 06:27:17 AEST
(
hide
)
Description:
generally skip throwing away opened sockets on EADDRNOTAVAIL
Filename:
MIME Type:
Creator:
Petr Cerny [:hrosik]
Created:
2017-08-30 06:27:17 AEST
Size:
1.04 KB
patch
obsolete
># HG changeset patch ># Parent fd12be912cfd86dc648bf383ceb616f01794b3a8 >Do not throw away already open sockets for X11 forwarding if another socket >family is not available for bind() > >diff --git a/openssh-7.2p2/channels.c b/openssh-7.2p2/channels.c >--- a/openssh-7.2p2/channels.c >+++ b/openssh-7.2p2/channels.c >@@ -3933,16 +3933,25 @@ x11_create_display_inet(int x11_display_ > if (ai->ai_family == AF_INET6) > sock_set_v6only(sock); > if (x11_use_localhost) > channel_set_reuseaddr(sock); > if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) { > debug2("bind port %d: %.100s", port, strerror(errno)); > close(sock); > >+ /* do not remove successfully opened >+ * sockets if the request failed because >+ * the protocol IPv4/6 is not available >+ * (e.g. IPv6 may be disabled while being >+ * supported) >+ */ >+ if (EADDRNOTAVAIL == errno) >+ continue; >+ > for (n = 0; n < num_socks; n++) { > close(socks[n]); > } > num_socks = 0; > break; > } > socks[num_socks++] = sock; > if (num_socks == NUM_SOCKS)
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 2143
:
2335
| 3044