aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2007-03-26 12:26:49 +0800
committermarcus <marcus@FreeBSD.org>2007-03-26 12:26:49 +0800
commit55d2e8810e65b6b0d9538497184f84c2750437c8 (patch)
tree6227712ba2ad6535f7f058bd2a13e13d639f58cc /net
parentc2daa3394649b99ac42877bec47cf8c475e3a604 (diff)
downloadfreebsd-ports-gnome-55d2e8810e65b6b0d9538497184f84c2750437c8.tar.gz
freebsd-ports-gnome-55d2e8810e65b6b0d9538497184f84c2750437c8.tar.zst
freebsd-ports-gnome-55d2e8810e65b6b0d9538497184f84c2750437c8.zip
Use IPv4-mapped IPv6 sockets so that vino-server can become bilingual.
This allows IPv6 support to be enabled by default but still listen for v4 connections. Submitted by: ume
Diffstat (limited to 'net')
-rw-r--r--net/vino/Makefile14
-rw-r--r--net/vino/files/patch-server_libvncserver_sockets.c22
-rw-r--r--net/vino/files/patch-server_vino-http.c24
3 files changed, 48 insertions, 12 deletions
diff --git a/net/vino/Makefile b/net/vino/Makefile
index 909de0871ad1..e8694568be18 100644
--- a/net/vino/Makefile
+++ b/net/vino/Makefile
@@ -8,7 +8,7 @@
PORTNAME= vino
PORTVERSION= 2.18.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net gnome
MASTER_SITES= ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/${PORTNAME}/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}
@@ -32,14 +32,4 @@ CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include" \
GCONF_SCHEMAS= vino-server.schemas
-OPTIONS= IPV6 "Enable IPv6 support" off
-
-.include <bsd.port.pre.mk>
-
-.if defined(WITH_IPV6)
-CONFIGURE_ARGS+= --enable-ipv6
-.else
-CONFIGURE_ARGS+= --disable-ipv6
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/net/vino/files/patch-server_libvncserver_sockets.c b/net/vino/files/patch-server_libvncserver_sockets.c
new file mode 100644
index 000000000000..b182a2c4fc91
--- /dev/null
+++ b/net/vino/files/patch-server_libvncserver_sockets.c
@@ -0,0 +1,22 @@
+Index: server/libvncserver/sockets.c
+diff -u -p server/libvncserver/sockets.c.orig server/libvncserver/sockets.c
+--- server/libvncserver/sockets.c.orig Tue Jan 2 22:34:50 2007
++++ server/libvncserver/sockets.c Sun Mar 25 22:52:02 2007
+@@ -560,6 +560,7 @@ ListenOnTCPPort(port, localOnly)
+
+ #ifdef ENABLE_IPV6
+ struct sockaddr_in6 addr_in6;
++ int off = 0;
+
+ memset(&addr_in6, 0, sizeof(addr_in6));
+ addr_in6.sin6_family = AF_INET6;
+@@ -570,6 +571,9 @@ ListenOnTCPPort(port, localOnly)
+ addrlen = sizeof(addr_in6);
+
+ sock = socket(AF_INET6, SOCK_STREAM, 0);
++#ifdef IPV6_V6ONLY
++ setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, (void *)&off, sizeof(off));
++#endif
+ #endif
+
+ if (sock < 0) {
diff --git a/net/vino/files/patch-server_vino-http.c b/net/vino/files/patch-server_vino-http.c
new file mode 100644
index 000000000000..d51f9588589a
--- /dev/null
+++ b/net/vino/files/patch-server_vino-http.c
@@ -0,0 +1,24 @@
+Index: server/vino-http.c
+diff -u -p server/vino-http.c.orig server/vino-http.c
+--- server/vino-http.c.orig Tue Feb 27 19:47:35 2007
++++ server/vino-http.c Sun Mar 25 20:56:41 2007
+@@ -595,6 +595,9 @@ vino_http_create_listening_socket (VinoH
+ {
+ #ifdef ENABLE_IPV6
+ struct sockaddr_in6 saddr_in6;
++#ifdef IPV6_V6ONLY
++ int off = 0;
++#endif
+ #endif
+ struct sockaddr_in saddr_in;
+ struct sockaddr *saddr;
+@@ -621,6 +624,9 @@ vino_http_create_listening_socket (VinoH
+
+ #ifdef ENABLE_IPV6
+ sock = socket (AF_INET6, SOCK_STREAM, 0);
++#ifdef IPV6_V6ONLY
++ setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, (void *)&off, sizeof(off));
++#endif
+
+ memset (&saddr_in6, 0, sizeof (struct sockaddr_in6));
+ saddr_in6.sin6_family = AF_INET6;