--- /tmp/xdmcp.c 2013-11-09 09:59:58.000000000 +0100 +++ ./os/xdmcp.c 2013-11-09 10:13:43.000000000 +0100 @@ -1001,13 +1001,32 @@ sizeof(soopts)) < 0) XdmcpWarning("UDP set broadcast socket-option failed"); #endif /* SO_BROADCAST */ - if (xdmcpSocket >= 0 && xdm_from != NULL) { - if (bind(xdmcpSocket, (struct sockaddr *) &FromAddress, - FromAddressLen) < 0) { - FatalError("Xserver: failed to bind to -from address: %s\n", - xdm_from); + + + if (SOCKADDR_FAMILY(FromAddress) == AF_INET) + { + if (xdmcpSocket >= 0 && xdm_from != NULL) + { + if (bind(xdmcpSocket, (struct sockaddr *) &FromAddress, FromAddressLen) < 0) + { + FatalError("Xserver: failed to bind to -from address: %s\n", xdm_from); + } + } + + #if defined(IPv6) && defined(AF_INET6) + else if (SOCKADDR_FAMILY(FromAddress) == AF_INET6) + { + if (xdmcpSocket6 >= 0 && xdm_from != NULL) + { + if (bind(xdmcpSocket6, (struct sockaddr *) &FromAddress, FromAddressLen) < 0) + { + FatalError("Xserver: 201311091004 failed to bind to -from address: %s\n", xdm_from); } + } + } + #endif } + #endif /* STREAMSCONN */ }