From: "cron2 (Code Review)" Date: Wed, 8 Oct 2025 09:14:26 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., marco@...2726..., openvpn-devel@lists.sourceforge.net, frank@...2641..., antonio@...2726... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="GfBD+zJrM9Q="; 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: mrbff , plaisthos , flichtenheld Cc: openvpn-devel --GfBD+zJrM9Q= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#7) to the change originally created by= mrbff. ( http://gerrit.openvpn.net/c/openvpn/+/1245?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by ordex 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 Acked-by: Antonio Quartulli Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1245 Message-Id: <20251008083046.27209-1-gert@...1296...> URL: https://sourceforge.net/p/openvpn/mailman/message/59243711/ Signed-off-by: Gert Doering --- M src/openvpn/push.c M src/openvpn/push_util.c M src/openvpn/ssl.c M tests/unit_tests/openvpn/test_push_update_msg.c 4 files changed, 20 insertions(+), 3 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/45/1245/7 diff --git a/src/openvpn/push.c b/src/openvpn/push.c index e7fc50c..0c8eb84 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 pr= ocessed in client mode while DCO is enabled, ignoring." + " To be able to process PUSH_UPDATE messages, be s= ure 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..f306104 100644 --- a/src/openvpn/push_util.c +++ b/src/openvpn/push_util.c @@ -191,6 +191,13 @@ int send_push_update(struct multi_context *m, const void *target, const char *= msg, const push_update_type type, const int push_bundle_size) { + 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 0; + } + if (!msg || !*msg || !m || (!target && type !=3D UPT_BROADCAST)) { @@ -294,7 +301,6 @@ } \ } while (0) - bool management_callback_send_push_update_broadcast(void *arg, const char *opti= ons) { 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) { diff --git a/tests/unit_tests/openvpn/test_push_update_msg.c b/tests/unit_t= ests/openvpn/test_push_update_msg.c index 8a5beeb..6e49f14 100644 --- a/tests/unit_tests/openvpn/test_push_update_msg.c +++ b/tests/unit_tests/openvpn/test_push_update_msg.c @@ -465,6 +465,7 @@ m->instances =3D calloc(1, sizeof(struct multi_instance *)); struct multi_instance *mi =3D calloc(1, sizeof(struct multi_instance)); *(m->instances) =3D mi; + m->top.options.disable_dco =3D true; *state =3D m; return 0; } -- 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: 7 Gerrit-Owner: mrbff Gerrit-Reviewer: cron2 Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: ordex Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel --GfBD+zJrM9Q= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 upl= oaded patch set #7 to the change originally created by mrbff.

<= p>View C= hange

The following approvals got outdated and were removed: Code-Review+2 by ordex

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

The PUSH_UPDATE currently doesn&= #39;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 drop= s.
Similarly in the client when a PUSH_UPDATE is received, the tun isclosed and reopened but the DCO doesn't receive the peer info.

= Change-Id: Ibe78949435bb2f26ad68301e2710321bf37c9486
Signed-off-by: Marc= o Baffo <marco@...2726...>
Acked-by: Antonio Quartulli <antonio= @...2726...>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1245<= br>Message-Id: <20251008083046.27209-1-gert@...1296...>
URL: https= ://sourceforge.net/p/openvpn/mailman/message/59243711/
Signed-off-by: Ge= rt Doering <gert@...1296...>
---
M src/openvpn/push.c
M src/= openvpn/push_util.c
M src/openvpn/ssl.c
M tests/unit_tests/openvpn/te= st_push_update_msg.c
4 files changed, 20 insertions(+), 3 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn r=
efs/changes/45/1245/7
diff --git a/src/openvpn/push.c b/src/openvpn=
/push.c
index e7fc50c..0c8eb84 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 processed in client mode while DCO is = enabled, ignoring."
+ " To be able to process PUSH_UPDATE messa= ges, 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);
}
els= e
diff --git a/src/openvpn/push_util.c b/src/openvpn/push_u= til.c
index 9138bdb..f306104 100644
--- a/s= rc/openvpn/push_util.c
+++ b/src/openvpn/push_util.c=
@@ -191,6 +191,13 @@
int
send_p= ush_update(struct multi_context *m, const void *target, const char *msg, co= nst push_update_type type, const int push_bundle_size)
{
+ if (dco_enabled(&= amp;m->top.options))
+ {
+ ms= g(M_WARN, "WARN: PUSH_UPDATE messages cannot currently be sent while D= CO is enabled."
= + " To send a PUSH_UPDATE message, be sure to use t= he --disable-dco option.");
+ return 0;
+ }
+
if (!msg || !*msg || !m
|| (!ta= rget && type !=3D UPT_BROADCAST))
{
= @@ -294,7 +301,6 @@
} = \
} while (0)

-
bool
management_callback_send_push_update_broa= dcast(void *arg, const char *options)
{
di= ff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c
index 3403= 6f2..567560f 100644
--- a/src/openvpn/ssl.c
+++ b/src/openvpn/ssl.c

@@ -1926,8 +1926,12 @@
<= span> /* support for exit notify via control channel */

<= span> iv_proto |=3D IV_PROTO_CC_EXIT_NOTIFY;


- /* support push-up= dates */
- iv_pr= oto |=3D IV_PROTO_PUSH_UPDATE;
+ /* currently push-update is not supported when DCO is en= abled */
+ if = (!session->opt->dco_enabled)
+ {
+ /* support push-updates */
+ iv_proto |=3D IV_PROTO_PUSH_UPDATE;
+ }

if (session->opt->pull)
{
diff --git a/tests/unit_tests/openvpn/test_push= _update_msg.c b/tests/unit_tests/openvpn/test_push_update_msg.c
<= span>index 8a5beeb..6e49f14 100644
--- a/tests/unit_tests/o= penvpn/test_push_update_msg.c
+++ b/tests/unit_tests/openvp= n/test_push_update_msg.c
@@ -465,6 +465,7 @@
m->instances =3D calloc(1, sizeof(struct multi_instance *));
struct multi_instance *mi =3D calloc(1, sizeof(struct mult= i_instance));
*(m->instances) =3D mi;
+ m->top.options.disable_dco= =3D true;
*state =3D m;
return 0= ;
}

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: 7
Gerrit-Owner: mrbff <marco@...2726...> <= /div>
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: ordex <antonio@...2726...&= gt;
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
= --GfBD+zJrM9Q=--