diff --git a/doc/man-sections/client-options.rst b/doc/man-sections/client-options.rst index b75fe5bdbad..84a626e3b14 100644 --- a/doc/man-sections/client-options.rst +++ b/doc/man-sections/client-options.rst @@ -430,7 +430,10 @@ configuration. The version of the operating system, e.g. 6.1 for Windows 7. This may be set by the client UI/GUI using ``--setenv``. On Windows systems it is automatically determined by openvpn - itself. + itself. On other platforms OpenVPN will default to sending + the information returned by the `uname()` system call in + the `release` field, which is usually the currently running + kernel version. This is highly system specific, though. :code:`UV_=` Client environment variables whose names start with diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c index b4a99e2408b..4fa7ea6fc45 100644 --- a/src/openvpn/ssl.c +++ b/src/openvpn/ssl.c @@ -2149,6 +2149,10 @@ push_peer_info(struct buffer *buf, struct tls_session *session) buf_printf(&out, "IV_SSL=%s\n", get_ssl_library_version() ); #if defined(_WIN32) buf_printf(&out, "IV_PLAT_VER=%s\n", win32_version_string(&gc, false)); +#else + struct utsname u; + uname(&u); + buf_printf(&out, "IV_PLAT_VER=%s\n", u.release); #endif } diff --git a/src/openvpn/syshead.h b/src/openvpn/syshead.h index 017d68d318c..3e0f31a036f 100644 --- a/src/openvpn/syshead.h +++ b/src/openvpn/syshead.h @@ -347,6 +347,10 @@ typedef int MIB_TCP_STATE; #include #endif +#ifndef _WIN32 +#include +#endif + /* * Pedantic mode is meant to accomplish lint-style program checking, * not to build a working executable.