From: "mrbff (Code Review)" Date: Tue, 7 Oct 2025 20:03:00 +0000 In-Reply-To: References: Reply-To: marco@...2726..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641..., gert@...1296... Message-ID: <932e6c6a476c6a3b8a16036e8e57bbb574f42b12-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="mPUcX6HFqxw="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: PUSH_UPDATE: disabling PUSH_UPDATE server and client if DCO is enabled List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: openvpn-devel --mPUcX6HFqxw= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: cron2, flichtenheld, plaisthos. Hello cron2, flichtenheld, plaisthos, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/1245?usp=3Demail to look at the new patch set (#5). Change subject: PUSH_UPDATE: disabling PUSH_UPDATE server and client if DCO= is enabled ...................................................................... PUSH_UPDATE: disabling PUSH_UPDATE server and client if DCO is enabled The PUSH_UPDATE currently doesn't work with DCO. For example, in server, if a new ifconfig is sent, the DCO doesn't receive the new peer address and the connection drops. Similarly in the client when a PUSH_UPDATE is received, the tun is closed and reopened but the DCO doesn't receive the peer info. Change-Id: Ibe78949435bb2f26ad68301e2710321bf37c9486 Signed-off-by: Marco Baffo --- M src/openvpn/push.c M src/openvpn/push_util.c M src/openvpn/ssl.c 3 files changed, 28 insertions(+), 3 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/45/1245/5 diff --git a/src/openvpn/push.c b/src/openvpn/push.c index e7fc50c..e5f090f 100644 --- a/src/openvpn/push.c +++ b/src/openvpn/push.c @@ -1112,6 +1112,12 @@ } else if (honor_received_options && buf_string_compare_advance(&buf, pu= sh_update_cmd)) { + if (dco_enabled(&c->options)) + { + msg(M_WARN, "WARN: PUSH_UPDATE messages cannot currently be re= ceived while DCO is enabled, ignoring." + " To receive PUSH_UPDATE messages, be sure to use = the --disable-dco option."); + return PUSH_MSG_ERROR; + } return process_incoming_push_update(c, permission_mask, option_typ= es_found, &buf, false); } else diff --git a/src/openvpn/push_util.c b/src/openvpn/push_util.c index 9138bdb..bbca00f 100644 --- a/src/openvpn/push_util.c +++ b/src/openvpn/push_util.c @@ -294,10 +294,17 @@ } \ } while (0) =20 - bool management_callback_send_push_update_broadcast(void *arg, const char *opti= ons) { + struct multi_context *m =3D arg; + if (dco_enabled(&m->top.options)) + { + msg(M_WARN, "WARN: PUSH_UPDATE messages cannot currently be sent w= hile DCO is enabled." + " To send a PUSH_UPDATE message, be sure to use the --= disable-dco option."); + return false; + } + int n_sent =3D send_push_update(arg, NULL, options, UPT_BROADCAST, PUS= H_BUNDLE_SIZE); RETURN_UPDATE_STATUS(n_sent); @@ -306,6 +313,14 @@ bool management_callback_send_push_update_by_cid(void *arg, unsigned long cid, = const char *options) { + struct multi_context *m =3D arg; + if (dco_enabled(&m->top.options)) + { + msg(M_WARN, "WARN: PUSH_UPDATE messages cannot currently be sent w= hile DCO is enabled." + " To send a PUSH_UPDATE message, be sure to use the --= disable-dco option."); + return false; + } + int n_sent =3D send_push_update(arg, &cid, options, UPT_BY_CID, PUSH_B= UNDLE_SIZE); RETURN_UPDATE_STATUS(n_sent); diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c index 34036f2..567560f 100644 --- a/src/openvpn/ssl.c +++ b/src/openvpn/ssl.c @@ -1926,8 +1926,12 @@ /* support for exit notify via control channel */ iv_proto |=3D IV_PROTO_CC_EXIT_NOTIFY; - /* support push-updates */ - iv_proto |=3D IV_PROTO_PUSH_UPDATE; + /* 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) { -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1245?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: newpatchset Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ibe78949435bb2f26ad68301e2710321bf37c9486 Gerrit-Change-Number: 1245 Gerrit-PatchSet: 5 Gerrit-Owner: mrbff Gerrit-Reviewer: cron2 Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: cron2 Gerrit-Attention: flichtenheld --mPUcX6HFqxw= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: cron2, flichtenheld, plaisthos.

mrbff uploaded patch set #5 to this change.

View Change

PUSH_UPDATE: disabling PUSH_UPDATE server and client if=
 DCO is enabled

The PUSH_UPDATE currently doesn't work with DCO.=
For example, in server, if a new ifconfig is sent, the DCO
doesn'= ;t receive the new peer address and the connection drops.
Similarly in t= he client when a PUSH_UPDATE is received, the tun is
closed and reopened= but the DCO doesn't receive the peer info.

Change-Id: Ibe789494= 35bb2f26ad68301e2710321bf37c9486
Signed-off-by: Marco Baffo <marco@...1186...= .2726...>
---
M src/openvpn/push.c
M src/openvpn/push_util.cM src/openvpn/ssl.c
3 files changed, 28 insertions(+), 3 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn r=
efs/changes/45/1245/5
diff --git a/src/openvpn/push.c b/src/openvpn=
/push.c
index e7fc50c..e5f090f 100644
--- a= /src/openvpn/push.c
+++ b/src/openvpn/push.c
@@ -1112,6 +1112,12 @@
}
else i= f (honor_received_options && buf_string_compare_advance(&buf, p= ush_update_cmd))
{
+ if (dco_enabled(&c->options))
= + {
+ msg(M_WARN, "WARN: PUSH= _UPDATE messages cannot currently be received while DCO is enabled, ignorin= g."
+ = " To receive PUSH_UPDATE messages, be sure to use the --d= isable-dco option.");
+ return PUSH_MSG_ERROR;
+ }
return process_inc= oming_push_update(c, permission_mask, option_types_found, &buf, false);=
}
else
diff --gi= t a/src/openvpn/push_util.c b/src/openvpn/push_util.c
index= 9138bdb..bbca00f 100644
--- a/src/openvpn/push_util.c

+++ b/src/openvpn/push_util.c
@@ -294,10 +294,1= 7 @@
} = \
} while (0)

-
bool
management_callback_send_push_update_broadcast(void *arg, cons= t char *options)
{
+ struct multi_context *m =3D arg;
+ if (dco_enabled(&m->top.option= s))
+ {
= + msg(M_WARN, "WARN= : PUSH_UPDATE messages cannot currently be sent while DCO is enabled."=
+ = " To send a PUSH_UPDATE message, be sure to use the --disable-dco opt= ion.");
+ = return false;
+ }=
+
= int n_sent =3D send_push_update(arg, NULL, options, UPT_BROADCAST, PUSH_= BUNDLE_SIZE);

RETURN_UPDATE_STATUS(n= _sent);
@@ -306,6 +313,14 @@
bool management_callback_send_push_update_by_cid(void *arg, unsigned lo= ng cid, const char *options)
{
+ struct multi_context *m =3D arg;
= + if (dco_enabled(&m->= ;top.options))
+ {=
+ msg(M_WARN,= "WARN: PUSH_UPDATE messages cannot currently be sent while DCO is ena= bled."
+ = " To send a PUSH_UPDATE message, be sure to use the --disa= ble-dco option.");
+ return false;
+ }
+<= br> int n_sent =3D send_push_update(arg, &cid, options, UPT_B= Y_CID, PUSH_BUNDLE_SIZE);

RETURN_UPD= ATE_STATUS(n_sent);
diff --git a/src/openvpn/ssl.c b/src/op= envpn/ssl.c
index 34036f2..567560f 100644
-= -- a/src/openvpn/ssl.c
+++ b/src/openvpn/ssl.c
@@ -1926,8 +1926,12 @@

/* support for exit not= ify via control channel */
iv_proto |=3D IV_PROTO_= CC_EXIT_NOTIFY;

- /* support push-updates */
- iv_proto |=3D IV_PROTO_PUSH_UPDATE;=
+ /* currently push-= update is not supported when DCO is enabled */
+ if (!session->opt->dco_enabled)
+ {
+ /* support push-upda= tes */

+ i= v_proto |=3D IV_PROTO_PUSH_UPDATE;
+ }

if (ses= sion->opt->pull)
{

To view, visit change 1245. To unsubscribe, or for help writing mail= filters, visit = settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ibe78949435bb2f26ad68301e271= 0321bf37c9486
Gerrit-Change-Number: 1245
Gerrit-PatchSet: 5
Gerrit-Owner: mrbff <marco@...2726...> <= /div>
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: cron2 <gert@...1296...>= ;
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
= --mPUcX6HFqxw=--