diff -uNr vino-2.17.2/server/libvncserver/rfbserver.c vino-2.17.2-host/server/libvncserver/rfbserver.c
--- vino-2.17.2/server/libvncserver/rfbserver.c	2006-10-20 07:15:44.000000000 -0300
+++ vino-2.17.2-host/server/libvncserver/rfbserver.c	2006-11-17 09:06:48.000000000 -0300
@@ -27,6 +27,7 @@
 #include <string.h>
 #include <rfb/rfb.h>
 #include <rfb/rfbregion.h>
+#include <netdb.h>
 
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
@@ -118,11 +119,12 @@
 }
 
 
+/* I guess we don't need this function anymore*/
 static char *
 rfbSockaddrToHostname(struct sockaddr *addr)
 {
     char  buf_in[INET_ADDRSTRLEN];
-    char  buf_in6[INET_ADDRSTRLEN];
+    char  buf_in6[INET6_ADDRSTRLEN];
     void *src;
     char *buf;
     int   buflen;
@@ -190,9 +192,10 @@
     rfbProtocolVersionMsg pv;
     rfbClientIteratorPtr iterator;
     rfbClientPtr cl,cl_;
-    struct sockaddr_in addr;
-    size_t addrlen = sizeof(struct sockaddr_in);
+    struct sockaddr_storage addr;
+    size_t addrlen = sizeof(addr);
     int i;
+    char host[NI_MAXHOST];
 
     cl = (rfbClientPtr)calloc(sizeof(rfbClientRec),1);
 
@@ -206,8 +209,10 @@
       int one=1;
 
       getpeername(sock, (struct sockaddr *)&addr, &addrlen);
+      getnameinfo((struct sockaddr *)&addr, addrlen, host, sizeof(host), NULL, 0, NI_NOFQDN);
 
-      cl->host = rfbSockaddrToHostname ((struct sockaddr *) &addr);
+      //cl->host = rfbSockaddrToHostname ((struct sockaddr *) &addr);
+      cl->host = strdup(host);
 
       rfbLog("Got connection from client %s\n", cl->host);
 
