summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorReinhard Max <max@suse.de>2016-04-28 15:21:15 +0200
committerAdam Jackson <ajax@redhat.com>2016-06-21 11:43:09 -0400
commitfdd448cd39b4ca84a28d73fc628911070437b703 (patch)
tree78539c7f8b99dcc024bc37376acb1cccfd6bad1a /os
parentce82ae1964b2115a780786676c614546297a79c9 (diff)
XDMCP: For IPv6 add link local addresses to the end of the list
For link local addresses the XDMCP server would need to either know the interface thru a scope identifier or try all available interfaces. If they don't this address will fail in which case the XDMCP server could still try the other addresses passed - however some only try the first address and then give up. Even if this seems to be the wrong place to fix this it seems to be easier than fixing all display servers. [ajax: Cleaned up commit message] Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'os')
-rw-r--r--os/access.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/os/access.c b/os/access.c
index 8828e0834..e7d9d2916 100644
--- a/os/access.c
+++ b/os/access.c
@@ -827,7 +827,9 @@ DefineSelf(int fd)
/*
* ignore 'localhost' entries as they're not useful
- * on the other end of the wire
+ * on the other end of the wire and because on hosts
+ * with shared home dirs they'll result in conflicting
+ * entries in ~/.Xauthority
*/
if (ifr->ifa_flags & IFF_LOOPBACK)
continue;
@@ -848,6 +850,14 @@ DefineSelf(int fd)
else if (family == FamilyInternet6 &&
IN6_IS_ADDR_LOOPBACK((struct in6_addr *) addr))
continue;
+
+ /* Ignore IPv6 link local addresses (fe80::/10), because
+ * they need a scope identifier, which we have no way
+ * of telling to the other end.
+ */
+ if (family == FamilyInternet6 &&
+ IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)addr))
+ continue;
#endif
XdmcpRegisterConnection(family, (char *) addr, len);
#if defined(IPv6) && defined(AF_INET6)