diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/openvpn/ssl.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c index 69f77f3..58ba238 100644 --- a/src/openvpn/ssl.c +++ b/src/openvpn/ssl.c @@ -1834,15 +1834,17 @@ push_peer_info(struct buffer *buf, struct tls_session *session) get_default_gateway (&rgi); if (rgi.flags & RGI_HWADDR_DEFINED) buf_printf (&out, "IV_HWADDR=%s\n", format_hex_ex (rgi.hwaddr, 6, 0, 1, ":", &gc)); + } - /* push env vars that begin with UV_ */ - for (e=es->list; e != NULL; e=e->next) + /* push env vars that begin with UV_ and IV_OPENVPN_GUI_VERSION */ + for (e=es->list; e != NULL; e=e->next) + { + if (e->string) { - if (e->string) - { - if (!strncmp(e->string, "UV_", 3) && buf_safe(&out, strlen(e->string)+1)) - buf_printf (&out, "%s\n", e->string); - } + if (((strncmp(e->string, "UV_", 3)==0 && session->opt->push_peer_info_detail >= 2) + || (strncmp(e->string,"IV_OPENVPN_GUI_VERSION=",sizeof("IV_OPENVPN_GUI_VERSION=")-1)==0)) + && buf_safe(&out, strlen(e->string)+1)) + buf_printf (&out, "%s\n", e->string); } } |
