diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2009-03-08 09:22:52 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2009-03-08 09:22:52 +0800 |
commit | df54b55d9e49a39a36eaabe88c0c90bfacd82255 (patch) | |
tree | c80431a7e248ed724c864ee3aa8f22228d5ac652 | |
parent | d45b1a205548bcdcea5326178b8cb5de9a4ec0fb (diff) | |
download | marcuscom-ports-df54b55d9e49a39a36eaabe88c0c90bfacd82255.tar marcuscom-ports-df54b55d9e49a39a36eaabe88c0c90bfacd82255.tar.gz marcuscom-ports-df54b55d9e49a39a36eaabe88c0c90bfacd82255.tar.bz2 marcuscom-ports-df54b55d9e49a39a36eaabe88c0c90bfacd82255.tar.lz marcuscom-ports-df54b55d9e49a39a36eaabe88c0c90bfacd82255.tar.xz marcuscom-ports-df54b55d9e49a39a36eaabe88c0c90bfacd82255.tar.zst marcuscom-ports-df54b55d9e49a39a36eaabe88c0c90bfacd82255.zip |
Allow vino to listen on both IPv4 and v6 sockets.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@12039 df743ca5-7f9a-e211-a948-0013205c9059
-rw-r--r-- | net/vino/Makefile | 3 | ||||
-rw-r--r-- | net/vino/files/patch-server_libvncserver_sockets.c | 38 |
2 files changed, 26 insertions, 15 deletions
diff --git a/net/vino/Makefile b/net/vino/Makefile index 2307c84dd..ca52623a3 100644 --- a/net/vino/Makefile +++ b/net/vino/Makefile @@ -3,11 +3,12 @@ # Whom: Tom McLaughlin <tmclaugh@sdf.lonestar.org> # # $FreeBSD$ -# $MCom: ports/net/vino/Makefile,v 1.65 2009/02/28 01:43:23 marcus Exp $ +# $MCom: ports/net/vino/Makefile,v 1.66 2009/03/03 05:14:44 marcus Exp $ # PORTNAME= vino PORTVERSION= 2.25.92 +PORTREVISION= 1 CATEGORIES= net gnome MASTER_SITES= GNOME DIST_SUBDIR= gnome2 diff --git a/net/vino/files/patch-server_libvncserver_sockets.c b/net/vino/files/patch-server_libvncserver_sockets.c index 9014b85a2..348ea91d3 100644 --- a/net/vino/files/patch-server_libvncserver_sockets.c +++ b/net/vino/files/patch-server_libvncserver_sockets.c @@ -1,20 +1,30 @@ --- server/libvncserver/sockets.c.orig 2009-02-13 08:11:38.000000000 -0500 -+++ server/libvncserver/sockets.c 2009-02-27 20:24:02.000000000 -0500 -@@ -580,6 +580,7 @@ ListenOnTCPPort(rfbScreenInfoPtr rfbScre - { - #ifdef ENABLE_IPV6 - struct sockaddr_in6 s6; ++++ server/libvncserver/sockets.c 2009-03-07 20:19:28.000000000 -0500 +@@ -668,6 +669,11 @@ NewSocketListenTCP(struct sockaddr *addr + { + int sock = -1; + int one = 1; ++#ifdef ENABLE_IPV6 ++#ifdef IPV6_V6ONLY + int off = 0; ++#endif ++#endif - memset(&s6, 0, sizeof(s6)); - s6.sin6_family = AF_INET6; -@@ -587,6 +588,9 @@ ListenOnTCPPort(rfbScreenInfoPtr rfbScre - s6.sin6_addr = in6addr_any; + if ((sock = socket(addr->sa_family, SOCK_STREAM, 0)) < 0) + return -1; +@@ -677,6 +683,15 @@ NewSocketListenTCP(struct sockaddr *addr + return -1; + } - sock = NewSocketListenTCP ((struct sockaddr*)&s6, sizeof(s6)); ++#ifdef ENABLE_IPV6 +#ifdef IPV6_V6ONLY -+ setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, (void *)&off, sizeof(off)); ++ if (setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, (void *)&off, sizeof(off)) < 0) { ++ close(sock); ++ return -1; ++ } ++#endif +#endif - rfbLog("Listening IPv{4,6}://*:%d\n", port); - #endif - if(sock < 0) { ++ + if (bind(sock, addr, len) < 0) { + close(sock); + return -1; |