diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2024-05-05 20:51:40 +0200 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2024-05-11 18:56:27 +0200 |
commit | f404db35d8a777cdee10511fa694380284ffcb8b (patch) | |
tree | 988737fb0c1da399f362dccfd58db25c22c504c3 | |
parent | 0670f7583d63977cb175ffe11a64061f88c1bf31 (diff) | |
download | nx-libs-f404db35d8a777cdee10511fa694380284ffcb8b.tar.gz nx-libs-f404db35d8a777cdee10511fa694380284ffcb8b.tar.bz2 nx-libs-f404db35d8a777cdee10511fa694380284ffcb8b.zip |
xserver doesn't stop all connections to localhost
Backport of the following commit + manual fix at some other locations.
commit 75b9383d8a4c113ab3c6cfc1d5efcb5d9982a1bf
Author: Jesse Adkins <jesserayadkins@gmail.com>
Date: Tue Aug 18 21:13:40 2009 -0700
xserver doesn't stop all connections to localhost
X.Org Bugzilla #23329: http://bugs.freedesktop.org/show_bug.cgi?id=23329
Patch #28648: http://bugs.freedesktop.org/attachment.cgi?id=28648
I noticed in xserver at os/access.c that xorg tries to stop connections
to localhost by checking against the address 127.0.0.1. However, RFC
3330 defines the localhost network as 127.0.0.0/8. This means that any
IPv4 address that starts with 127 is just another name for localhos
-rw-r--r-- | nx-X11/programs/Xserver/os/access.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/nx-X11/programs/Xserver/os/access.c b/nx-X11/programs/Xserver/os/access.c index bea4b968a..bd5a2b69c 100644 --- a/nx-X11/programs/Xserver/os/access.c +++ b/nx-X11/programs/Xserver/os/access.c @@ -405,8 +405,7 @@ DefineSelf (int fd) * on the other end of the wire. */ if (len == 4 && - addr[0] == 127 && addr[1] == 0 && - addr[2] == 0 && addr[3] == 1) + addr[0] == 127) continue; /* @@ -541,8 +540,8 @@ DefineSelf (int fd) */ if (family == FamilyInternet && !(len == 4 && - ((addr[0] == 127 && addr[1] == 0 && - addr[2] == 0 && addr[3] == 1) || + /* backport 75b9383d8a4c113ab3c6cfc1d5efcb5d9982a1bf */ + ((addr[0] == 127 || (addr[0] == 0 && addr[1] == 0 && addr[2] == 0 && addr[3] == 0))) ) @@ -755,8 +754,7 @@ DefineSelf (int fd) * on the other end of the wire */ if (family == FamilyInternet && - addr[0] == 127 && addr[1] == 0 && - addr[2] == 0 && addr[3] == 1) + addr[0] == 127) continue; #if defined(IPv6) && defined(AF_INET6) else if (family == FamilyInternet6 && @@ -903,8 +901,7 @@ DefineSelf (int fd) continue; if (family == FamilyInternet && - addr[0] == 127 && addr[1] == 0 && - addr[2] == 0 && addr[3] == 1) + addr[0] == 127) continue; /* |