Skip to contentSkip to conversation

Complete push-peer-info documentation and allow IV_PLAT_VER for other platforms than Windows if the client UI supplies it.

PATCH Superseded Arne Schwabe 2 participants 3 messages Jan 2, 2016 – Jun 11, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Complete push-peer-info documentation and allow IV_PLAT_VER for other platforms than Windows if the client UI supplies it.

---
 doc/openvpn.8     | 6 ++++++
 src/openvpn/ssl.c | 6 ++++--
 2 files changed, 10 insertions(+), 2 deletions(-)
doc/openvpn.8 +6 -0
index 6d5807f..52ebe59 100644
@@ -2962,6 +2962,12 @@ IV_HWADDR=<mac address> -- the MAC address of clients default gateway
 
 IV_LZO_STUB=1 -- if client was built with LZO stub capability
 
+IV_UI_VER=<gui_id> <version> -- the UI version of a UI if one is
+running, for example "de.blinkt.openvpn 0.5.47" for the
+Android app.
+
+IV_PLAT_VER=x.y - the version of the operating system, e.g. 6.1 for Windows 7.
+
 UV_<name>=<value> -- client environment variables whose names start with "UV_"
 .\"*********************************************************
 .TP
src/openvpn/ssl.c +4 -2
index 9465846..39da06f 100644
@@ -1879,8 +1879,10 @@ push_peer_info(struct buffer *buf, struct tls_session *session)
 	{
 	  if (e->string)
 	    {
-	      if (((strncmp(e->string, "UV_", 3)==0 && session->opt->push_peer_info_detail >= 2)
-		   || (strncmp(e->string,"IV_GUI_VER=",sizeof("IV_GUI_VER=")-1)==0))
+	      if ((((strncmp(e->string, "UV_", 3)==0 ||
+		     strncmp(e->string, "IV_GUI_VER=", sizeof("IV_GUI_VER"))==0)&&
+		    session->opt->push_peer_info_detail >= 2)
+		   || (strncmp(e->string,"IV_PLAT_VER=",sizeof("IV_PLAT_VER=")-1)==0))
 		  && buf_safe(&out, strlen(e->string)+1))
 		buf_printf (&out, "%s\n", e->string);
 	    }
Signature · 1 line
2.5.4 (Apple Git-61)
#1 lore raw

PATCH v2 1/1 Complete push-peer-info documentation and allow IV_PLAT_VER for other platforms than Windows if the client UI supplies it.

doc/openvpn.8 +28 -3
index 5a4efc6..d99aaf5 100644
@@ -2952,16 +2952,41 @@ configuration file.  This option will ignore
 options at the global config file level.
 .TP
 .B \-\-push\-peer\-info
-Push additional information about the client to server.  The additional information
-consists of the following data:
+Push additional information about the client to server. The following data is always pushed to
+the server.
 
 IV_VER=<version> -- the client OpenVPN version
 
 IV_PLAT=[linux|solaris|openbsd|mac|netbsd|freebsd|win] -- the client OS platform
 
+IV_LZO_STUB=1 -- if client was built with LZO stub capability
+
+IV_LZ4=1 -- if the client supports LZ4 compressions.
+
+IV_RGI6=1 -- if the client supports
+.B \-\-redirect\-gateway
+for ipv6
+
+IV_PROTO=2 -- if the client supports peer-id floating mechansim
+
+IV_NCP=2 -- negotiable ciphers, client supports
+.B \-\-cipher
+pushed by the server, a value of 2 or greater indidactes additional
+support AES-GCM-128 and AES-GCM-256.
+
+IV_UI_VER=<gui_id> <version> -- the UI version of a UI if one is
+running, for example "de.blinkt.openvpn 0.5.47" for the
+Android app.
+
+When
+.B \-\-push\-peer\-info
+is enabled the additional information consists of the following data:
+
 IV_HWADDR=<mac address> -- the MAC address of clients default gateway
 
-IV_LZO_STUB=1 -- if client was built with LZO stub capability
+IV_SSL=<version string> -- the ssl version used by the client, e.g. "OpenSSL 1.0.2f 28 Jan 2016".
+
+IV_PLAT_VER=x.y - the version of the operating system, e.g. 6.1 for Windows 7.
 
 UV_<name>=<value> -- client environment variables whose names start with "UV_"
 .\"*********************************************************
src/openvpn/ssl.c +7 -5
index f188558..14da733 100644
@@ -1903,15 +1903,17 @@ push_peer_info(struct buffer *buf, struct tls_session *session)
 #endif
         }
 
-      /* push env vars that begin with UV_ and IV_GUI_VER */
+      /* push env vars that begin with UV_, IV_PLAT_VER and IV_GUI_VER */
       for (e=es->list; e != NULL; e=e->next)
 	{
 	  if (e->string)
 	    {
-	      if (((strncmp(e->string, "UV_", 3)==0 && session->opt->push_peer_info_detail >= 2)
-		   || (strncmp(e->string,"IV_GUI_VER=",sizeof("IV_GUI_VER=")-1)==0))
-		  && buf_safe(&out, strlen(e->string)+1))
-		buf_printf (&out, "%s\n", e->string);
+            if ((((strncmp(e->string, "UV_", 3)==0 ||
+                   strncmp(e->string, "IV_PLAT_VER=", sizeof("IV_PLAT_VER=")-1)==0)
+                  && session->opt->push_peer_info_detail >= 2)
+                 || (strncmp(e->string,"IV_GUI_VER=", sizeof("IV_GUI_VER=")-1)==0))
+                && buf_safe(&out, strlen(e->string)+1))
+                buf_printf (&out, "%s\n", e->string);
 	    }
 	}
 
Signature · 1 line
2.5.4 (Apple Git-61)
#2 lore raw

Hi,

doc/openvpn.8

Quoted 4 lines · Arne Schwabe
doc/openvpn.8 +0 -0
index 5a4efc6..d99aaf5 100644

... took me long enough, but ACK. I've change the wording related to IV_NCP=2 a bit - there was a typo, and I think the resulting sentence is easier to understand now. Also, repaired a bit of tab-to-space change in ssl.c...

Your patch has been applied to the master and release/2.3 branches.

commit 960524a9af899c83dbf2de255e063b7c66536d3e (master) commit 769bbd6e1002af6b3d8a6c22deec036982566165 (master)

Author: Arne Schwabe <[email protected]...>
Date:   Tue Feb 16 13:04:40 2016 +0100
    Complete push-peer-info documentation and allow IV_PLAT_VER for other platforms than Windows if the client UI supplies it.
    
    Acked-by: Gert Doering <[email protected]...>
    Message-Id: <[email protected]...>
    URL: http://article.gmane.org/gmane.network.openvpn.devel/11175
    
    Signed-off-by: Gert Doering <[email protected]...>

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...