aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-03-10 09:00:36 +0000
committermarha <marha@users.sourceforge.net>2011-03-10 09:00:36 +0000
commitb5f8cc93800ce69d2c984081471b05e650ba9ddd (patch)
tree799fcc75462152c93d0ece6b65a644ebae6d8894
parentc10c00e21e70361cbf93e7f104dc7474a1c91a14 (diff)
downloadvcxsrv-b5f8cc93800ce69d2c984081471b05e650ba9ddd.tar.gz
vcxsrv-b5f8cc93800ce69d2c984081471b05e650ba9ddd.tar.bz2
vcxsrv-b5f8cc93800ce69d2c984081471b05e650ba9ddd.zip
With -from also bind to ipv6 socket
-rw-r--r--xorg-server/os/xdmcp.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/xorg-server/os/xdmcp.c b/xorg-server/os/xdmcp.c
index f4ecc9b57..3958f06dc 100644
--- a/xorg-server/os/xdmcp.c
+++ b/xorg-server/os/xdmcp.c
@@ -1107,11 +1107,20 @@ get_xdmcp_sock(void)
sizeof(soopts)) < 0)
XdmcpWarning("UDP set broadcast socket-option failed");
#endif /* SO_BROADCAST */
- if (xdmcpSocket >= 0 && xdm_from != NULL) {
+ if (xdm_from)
+ {
+ if (xdmcpSocket >= 0 && SOCKADDR_FAMILY(FromAddress)==AF_INET) {
if (bind(xdmcpSocket, (struct sockaddr *)&FromAddress,
FromAddressLen) < 0) {
- FatalError("Xserver: failed to bind to -from address: %s\n", xdm_from);
+ FatalError("Xserver: failed to bind to -from address: %s error %d\n", xdm_from, WSAGetLastError());
+ }
+ }
+ else if (xdmcpSocket6 >= 0 && SOCKADDR_FAMILY(FromAddress)==AF_INET6) {
+ if (bind(xdmcpSocket6, (struct sockaddr *)&FromAddress,
+ FromAddressLen) < 0) {
+ FatalError("Xserver: failed to bind to -from address: %s error %d\n", xdm_from, WSAGetLastError());
}
+ }
}
#endif /* STREAMSCONN */
}