From: "plaisthos (Code Review)" Date: Tue, 21 Apr 2026 10:40:06 +0000 References: Reply-To: arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net Message-ID: <9c05111c6fbae66d5e8352c846e2ee51815c2653-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="p/zwj7SJQ7M="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: Only announce support push updates/IV_NCP when actually supporting it List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: openvpn-devel --p/zwj7SJQ7M= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable plaisthos has uploaded this change for review. ( http://gerrit.openvpn.net/= c/openvpn/+/1634?usp=3Demail ) Change subject: Only announce support push updates/IV_NCP when actually sup= porting 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 --- 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 |=3D 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 |=3D 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 |=3D 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=3D%d\n", session->opt->frame.tun_max_= mtu); } - /* support for Negotiable Crypto Parameters */ - if (session->opt->mode =3D=3D 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->confi= g_ncp_ciphers) && tls_item_in_cipher_list("AES-256-GCM", session->opt->co= nfig_ncp_ciphers)) { -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1634?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: newchange Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I0737b769e78e6d271ec874cadb9fbd81bfefdec1 Gerrit-Change-Number: 1634 Gerrit-PatchSet: 1 Gerrit-Owner: plaisthos Gerrit-CC: openvpn-devel --p/zwj7SJQ7M= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

plaisthos has upl= oaded this change for review.

View Change

Only announce support push updates/IV_NCP when actually supporting it
Currently even p2p clients that do not accept push message announce t= he
PUSH UPDATE flag.

The change for IV_NCP is more a documentatio= n 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: I07= 37b769e78e6d271ec874cadb9fbd81bfefdec1
Signed-off-by: Arne Schwabe <a= rne@...1227...>
---
M src/openvpn/ssl.c
1 file changed, 10 inse= rtions(+), 9 deletions(-)

git pull ssh://gerrit.=
openvpn.net:29418/openvpn refs/changes/34/1634/1
diff --git a/src/o=
penvpn/ssl.c b/src/openvpn/ssl.c
index 5868d53..86b6e42 100= 644
--- a/src/openvpn/ssl.c
+++ b/src/openv= pn/ssl.c
@@ -1920,15 +1920,15 @@
/= * support for exit notify via control channel */
i= v_proto |=3D IV_PROTO_CC_EXIT_NOTIFY;

- /* currently push-update is not s= upported when DCO is enabled */
- if (!session->opt->dco_enabled)
- {
- /* support push-updates */
- iv_proto |=3D IV_PROTO_P= USH_UPDATE;
- }<= /span>
-
= if (session->opt->pull)
{
+ /* currently push-upda= te is not supported when DCO is enabled */

+ if (!session->opt->dco_enabled)
+ {+ /* support p= ush-updates */
+ = iv_proto |=3D IV_PROTO_PUSH_UPDATE;
+ }
+
/* support for receiving= push_reply before sending
* push request, al= so signal that the client wants
* to get push= -reply messages without requiring a round
@@ -1945,9 +1945,= 10 @@
buf_printf(&out, "IV_MTU=3D%d\n= ", session->opt->frame.tun_max_mtu);
}<= /span>

- = /* support for Negotiable Crypto Parameters */
- if (session->opt->mode =3D=3D MO= DE_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("A= ES-128-GCM", session->opt->config_ncp_ciphers)
= && tls_item_in_cipher_list("AES-256-GCM",= session->opt->config_ncp_ciphers))
{

To view, visit change 1634. To unsubscribe, o= r for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I0737b769e78e6d271ec874cadb9= fbd81bfefdec1
Gerrit-Change-Number: 1634
Gerrit-PatchSet: 1
Gerrit-Owner: plaisthos <arne-openvpn@...1711...= 27...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
= --p/zwj7SJQ7M=--