Index: xdmcp.c =================================================================== RCS file: /usr/home/cvs/NetBSD/xsrc/external/mit/xdm/dist/xdmcp.c,v retrieving revision 1.1.1.3 diff -u -r1.1.1.3 xdmcp.c --- xdmcp.c 21 May 2010 04:36:42 -0000 1.1.1.3 +++ xdmcp.c 9 Nov 2011 07:24:01 -0000 @@ -51,6 +51,7 @@ # endif # include # include +# include # include # define Time_t time_t @@ -610,7 +611,7 @@ } else { - if (!getString (name, INET6_ADDRSTRLEN + 10)) { + if (!getString (name, INET6_ADDRSTRLEN + 20)) { if (ai) freeaddrinfo(ai); return NULL; @@ -631,6 +632,15 @@ freeaddrinfo(ai); return NULL; } +#if 1 + if (connectionType == FamilyInternet6 && + IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)data)) { + struct sockaddr_in6 *sin6 = (void *)originalAddress; + strcat(name, "%"); + if_indextoname(sin6->sin6_scope_id, + name + strlen(name)); + } +#endif snprintf(name + strlen(name), 10, ":%d", displayNumber); } if (ai)