diff options
| -rw-r--r-- | src/kvilib/net/kvi_socket.h | 5 | ||||
| -rw-r--r-- | src/modules/ident/libkviident.cpp | 9 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/kvilib/net/kvi_socket.h b/src/kvilib/net/kvi_socket.h index a201a49d5..295b60f19 100644 --- a/src/kvilib/net/kvi_socket.h +++ b/src/kvilib/net/kvi_socket.h @@ -46,6 +46,10 @@ #define KVI_INVALID_SOCKET INVALID_SOCKET + #define KVI_IPV6_PROTECTION_LEVEL IPV6_PROTECTION_LEVEL + #define KVI_PROTECTION_LEVEL_RESTRICTED 10 /* for Intranet apps */ + #define KVI_PROTECTION_LEVEL_DEFAULT 20 /* default level */ + #define KVI_PROTECTION_LEVEL_UNRESTRICTED 30 /* for peer-to-peer apps */ #else #include <sys/time.h> @@ -57,7 +61,6 @@ #include <unistd.h> #define KVI_INVALID_SOCKET (-1) - #endif #ifndef MSG_NOSIGNAL diff --git a/src/modules/ident/libkviident.cpp b/src/modules/ident/libkviident.cpp index 3d4f26ddb..9050bfa56 100644 --- a/src/modules/ident/libkviident.cpp +++ b/src/modules/ident/libkviident.cpp @@ -271,6 +271,15 @@ void KviIdentDaemon::run() goto ipv6_failure; } + #if defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW) + // under windows, we need to set the socket to be reachable from the outer internet + // see bug ticket #393 + if(!kvi_socket_setsockopt(m_sock6,KVI_SOCKET_PF_INET6,KVI_IPV6_PROTECTION_LEVEL,&(int){ KVI_PROTECTION_LEVEL_UNRESTRICTED }, sizeof(int)) + { + //this is not a fatal error + postMessage(__tr("Can't set the IPv6 ident service protection level to unrestricted: the ident service won't be exposed to the internet"),0); + } + #endif if(!sa6.socketAddress()) { postMessage(__tr("Can't enable the ident service on IPv6 : can't setup the listen address"),0); |
