!8 Update to 1.5.0
From: @wu-leilei Reviewed-by: @wang--ge Signed-off-by: @wang--ge
This commit is contained in:
commit
613fda3044
@ -1,59 +0,0 @@
|
||||
From 7898badde44cf518da6879c2622b6db9cd709c7d Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Fri, 6 May 2022 14:23:59 -0400
|
||||
Subject: [PATCH] Automatically disable inet6 transport if ipv6 is disabled on
|
||||
machine
|
||||
|
||||
If a machine is booted with ipv6.disable=1, trying to bind to an
|
||||
AF_INET6 socket will fail with AFNOSUPPORT.
|
||||
|
||||
The tcp transport automatically falls back to ipv4 in this case, but
|
||||
the more specific inet6 transport just fails.
|
||||
|
||||
This failure leads to MakeAllCOTSServerListeners returning a partial
|
||||
success.
|
||||
|
||||
Unfortunately, the X server can't really contiue with partial successes
|
||||
from this function if -displayfd is in use, since that would, in other
|
||||
cases, potentially lead to the -displayfd electing a display number that
|
||||
is potentially partially in use by a rogue program.
|
||||
|
||||
This commit addresses the issue by automatically disabling transports
|
||||
when they fail with AFNOSUPPORT, leading them to get ignored, rather than
|
||||
proceeding and ultimately returning from MakeAllCOTSServerListerns with
|
||||
partial=TRUE.
|
||||
---
|
||||
Xtranssock.c | 15 +++++++++++----
|
||||
1 file changed, 11 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/Xtranssock.c b/Xtranssock.c
|
||||
index 632c1b5..0177186 100644
|
||||
--- a/Xtranssock.c
|
||||
+++ b/Xtranssock.c
|
||||
@@ -611,12 +611,19 @@ TRANS(SocketOpenCOTSServer) (Xtransport *thistrans, const char *protocol,
|
||||
break;
|
||||
}
|
||||
if (i < 0) {
|
||||
- if (i == -1)
|
||||
- prmsg (1,"SocketOpenCOTSServer: Unable to open socket for %s\n",
|
||||
- thistrans->TransName);
|
||||
- else
|
||||
+ if (i == -1) {
|
||||
+ if (errno == EAFNOSUPPORT) {
|
||||
+ thistrans->flags |= TRANS_NOLISTEN;
|
||||
+ prmsg (1,"SocketOpenCOTSServer: Socket for %s unsupported on this system.\n",
|
||||
+ thistrans->TransName);
|
||||
+ } else {
|
||||
+ prmsg (1,"SocketOpenCOTSServer: Unable to open socket for %s\n",
|
||||
+ thistrans->TransName);
|
||||
+ }
|
||||
+ } else {
|
||||
prmsg (1,"SocketOpenCOTSServer: Unable to determine socket type for %s\n",
|
||||
thistrans->TransName);
|
||||
+ }
|
||||
return NULL;
|
||||
}
|
||||
|
||||
--
|
||||
2.37.3.windows.1
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
Name: xorg-x11-xtrans-devel
|
||||
Version: 1.4.0
|
||||
Release: 2
|
||||
Version: 1.5.0
|
||||
Release: 1
|
||||
Summary: X.Org X11 developmental X transport library
|
||||
License: MIT
|
||||
URL: http://www.x.org
|
||||
Source0: https://www.x.org/archive/individual/lib/xtrans-%{version}.tar.bz2
|
||||
Source0: https://www.x.org/archive/individual/lib/xtrans-%{version}.tar.gz
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: pkgconfig
|
||||
@ -12,7 +12,6 @@ BuildRequires: xorg-x11-util-macros
|
||||
|
||||
Patch1: xtrans-1.0.3-avoid-gethostname.patch
|
||||
|
||||
Patch6000: backport-0001-Automatically-disable-inet6-transport-if-ipv6-is-dis.patch
|
||||
|
||||
%description
|
||||
xtrans is a library of code that is shared among various X packages to
|
||||
@ -49,6 +48,9 @@ install -pm 644 AUTHORS ChangeLog COPYING README.md $RPM_BUILD_ROOT%{_pkgdocdir}
|
||||
%{_datadir}/pkgconfig/xtrans.pc
|
||||
|
||||
%changelog
|
||||
* Wed Oct 11 2023 wulei <wu_lei@hoperun.com> - 1.5.0-1
|
||||
- Update to 1.5.0
|
||||
|
||||
* Mon Jan 9 2023 mengwenhua <mengwenhua@xfusion.com> - 1.4.0-2
|
||||
- Automatically disable inet6 transport if ipv6 is disabled on machine
|
||||
|
||||
|
||||
Binary file not shown.
BIN
xtrans-1.5.0.tar.gz
Normal file
BIN
xtrans-1.5.0.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user