[PATCH] XDMCP: For IPv6 add IPv6 link local addresses to the end of the list

Egbert Eich eich at freedesktop.org
Sat Feb 8 10:56:04 PST 2014


On Sat, Feb 08, 2014 at 07:45:54PM +0100, Egbert Eich wrote:
> > ... OK, actually I have tested IPv6 UDP communication using link-local
> > addresses using netcat6. It doesn't work (-EINVAL on bind() that is used to
> > set the source address and port), so I will be very much surprised if XDMCP
> > works. If that requirement did not violate the list rules, I would even
> > require a tcpdump capture of a successful XDMCP session and some X11 traffic
> > along with the patch.
> 
> Ok, it's been a while and I didn't write the patch but I believe the whole
> reason for this patch was to move the link-local addresses out of the way
> ie. at the end of the list where they don't bother anybody.
> Therefore dropping them would also be an option - codewise it would be simpler
> and address most of the other concerns voiced.
> 

In fact, I've rechecked and we are now using a much simpler patch which does 
drop the link local address rather than fiddling with the order. This seems to
have been used for quite a while now.
I've ported this to the current Xserver head.
See attachment - would this be ok?

Cheers,
	Egbert.
-------------- next part --------------
>From e2e0c678592478c2b1449b0008aa5e4fb0717ace Mon Sep 17 00:00:00 2001
From: Reinhard Max <max at suse.de>
Date: Sat, 8 Feb 2014 19:32:08 +0100
Subject: [PATCH] XDMCP: Ignore IPv6 link local addresses

Ignore IPv6 link local addresses (fe80::/10), because
they need a scope identifier, which we have no way
of telling to the other end.

Signed-off-by: Egbert Eich <eich at freedesktop.org>
---
 os/access.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/os/access.c b/os/access.c
index e8c0781..1a2df34 100644
--- a/os/access.c
+++ b/os/access.c
@@ -600,7 +600,8 @@ DefineSelf(int fd)
                 continue;
 #if defined(IPv6) && defined(AF_INET6)
             else if (family == FamilyInternet6 &&
-                     IN6_IS_ADDR_LOOPBACK((struct in6_addr *) addr))
+                     (IN6_IS_ADDR_LOOPBACK((struct in6_addr *) addr) ||
+                      IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)addr)))
                 continue;
 #endif
 
@@ -733,7 +734,8 @@ DefineSelf(int fd)
                 continue;
 #if defined(IPv6) && defined(AF_INET6)
             else if (family == FamilyInternet6 &&
-                     IN6_IS_ADDR_LOOPBACK((struct in6_addr *) addr))
+                     (IN6_IS_ADDR_LOOPBACK((struct in6_addr *) addr) ||
+                      IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)addr)))
                 continue;
 #endif
             XdmcpRegisterConnection(family, (char *) addr, len);
-- 
1.8.1.4



More information about the xorg-devel mailing list