[S] Change in openvpn[master]: Only announce support push updates/IV_NCP when actually supporting it

"plaisthos (Code Review)" <[email protected]>
Newsgroups gmane.network.openvpn.devel
Message-ID <[email protected]>
plaisthos has uploaded this change for review. ( http://gerrit.openvpn.net/c/openvpn/+/1634?usp=email )


Change subject: Only announce support push updates/IV_NCP when actually supporting it
......................................................................

Only announce support push updates/IV_NCP when actually supporting it

Currently even p2p clients that do not accept push message announce the
PUSH UPDATE flag.

The change for IV_NCP is more a documentation bugfix as in mode server
we currently never have push_peer_info_detail > 0.

But change the message to indicate that IV_NCP nowadays is more a
legacy variable and replaced by IV_CIPHERS.

Change-Id: I0737b769e78e6d271ec874cadb9fbd81bfefdec1
Signed-off-by: Arne Schwabe <[email protected]>
---
M src/openvpn/ssl.c
1 file changed, 10 insertions(+), 9 deletions(-)



  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/34/1634/1

diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c
index 5868d53..86b6e42 100644
--- a/src/openvpn/ssl.c
+++ b/src/openvpn/ssl.c
@@ -1920,15 +1920,15 @@
         /* support for exit notify via control channel */
         iv_proto |= IV_PROTO_CC_EXIT_NOTIFY;
 
-        /* currently push-update is not supported when DCO is enabled */
-        if (!session->opt->dco_enabled)
-        {
-            /* support push-updates */
-            iv_proto |= IV_PROTO_PUSH_UPDATE;
-        }
-
         if (session->opt->pull)
         {
+            /* currently push-update is not supported when DCO is enabled */
+            if (!session->opt->dco_enabled)
+            {
+                /* support push-updates */
+                iv_proto |= IV_PROTO_PUSH_UPDATE;
+            }
+
             /* support for receiving push_reply before sending
              * push request, also signal that the client wants
              * to get push-reply messages without requiring a round
@@ -1945,9 +1945,10 @@
             buf_printf(&out, "IV_MTU=%d\n", session->opt->frame.tun_max_mtu);
         }
 
-        /* support for Negotiable Crypto Parameters */
-        if (session->opt->mode == MODE_SERVER || session->opt->pull)
+        if (session->opt->pull)
         {
+            /* legacy support for Negotiable Crypto Parameters (deprecated in favour
+             * of IV_CIPHERS */
             if (tls_item_in_cipher_list("AES-128-GCM", session->opt->config_ncp_ciphers)
                 && tls_item_in_cipher_list("AES-256-GCM", session->opt->config_ncp_ciphers))
             {

-- 
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1634?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I0737b769e78e6d271ec874cadb9fbd81bfefdec1
Gerrit-Change-Number: 1634
Gerrit-PatchSet: 1
Gerrit-Owner: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>

_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.