Package: vnc4server Version: 4.1.1+X4.3.0-34 Severity: important Tags: patch ipv6
Hello! The attached patch adds a workaround for the netbase bugs [1] and [2], which made the VNC Server and the listening mode of VNC Viewer listen only on IPv6 and not on IPv4. It is expected to apply in addition to the existing vncserver-ipv6-v2.patch, on top of it. After applying this patch, the issues [3], [4], [5] and [6] should be resolved. [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560238 [2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=562804 [3] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560137 [4] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=561619 [5] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=562169 [6] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=566758 -- With respect, Roman
--- orig/vnc4-4.1.1+X4.3.0/common/network/TcpSocket.cxx 2010-02-06 15:49:39.000000000 +0500
+++ new/common/network/TcpSocket.cxx 2010-02-06 15:32:15.000000000 +0500
@@ -329,6 +329,7 @@
initSockets();
if ((fd = socket(af, SOCK_STREAM, 0)) < 0) {
+ // - Socket creation failed
if (use_ipv6) {
// - We were trying to make an IPv6-capable socket - try again, but IPv4-only
use_ipv6 = false;
@@ -337,6 +338,13 @@
}
if (fd < 0)
throw SocketException("unable to create listening socket", errorNumber);
+ } else {
+ // - Socket creation succeeded
+ if (use_ipv6) {
+ // - We made an IPv6-capable socket, and we need it to do IPv4 too
+ int opt = 0;
+ setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &opt, sizeof(opt));
+ }
}
#ifndef WIN32
signature.asc
Description: PGP signature

