From 75b9383d8a4c113ab3c6cfc1d5efcb5d9982a1bf Mon Sep 17 00:00:00 2001 From: Jesse Adkins Date: Tue, 18 Aug 2009 21:13:40 -0700 Subject: [PATCH] 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 localhost. --- os/access.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/os/access.c b/os/access.c index 65765799b..8c5b50af0 100644 --- a/os/access.c +++ b/os/access.c @@ -415,8 +415,7 @@ DefineSelf (int fd) */ if (family == FamilyInternet && !(len == 4 && - ((addr[0] == 127 && addr[1] == 0 && - addr[2] == 0 && addr[3] == 1) || + ((addr[0] == 127) || (addr[0] == 0 && addr[1] == 0 && addr[2] == 0 && addr[3] == 0))) )