From: "cron2 (Code Review)" Date: Sun, 27 Jul 2025 12:19:36 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., marco@...2726..., openvpn-devel@lists.sourceforge.net, frank@...2641..., lstipakov@...277... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="5cGv7Y1ZEVk="; charset=UTF-8 Subject: [Openvpn-devel] [L] Change in openvpn[master]: PUSH_UPDATE: Allow OpenVPN in client mode to receive and handle PUSH ... List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: mrbff Cc: flichtenheld , stipa , plaisthos , openvpn-devel --5cGv7Y1ZEVk= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, mrbff, stipa. cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/ope= nvpn/+/808?usp=3Demail ) Change subject: PUSH_UPDATE: Allow OpenVPN in client mode to receive and ha= ndle PUSH UPDATE control messages to allow options updating at runtime. ...................................................................... Patch Set 21: Code-Review-1 (3 comments) Patchset: PS21:=20 I'm fine with most of the new version, but I'm still not really happy with = `apply_push_options()`. Sorry. File src/openvpn/options.c: http://gerrit.openvpn.net/c/openvpn/+/808/comment/f3fc7445_db3c4290 : PS21, Line 5524: { please get rid of this extra `if()` level. Both conditions are checked aga= in inside, so this is not really adding anything but an indent level. http://gerrit.openvpn.net/c/openvpn/+/808/comment/37cf1615_f21e2c77 : PS21, Line 5532: || (options->pull_filter_list && !apply_pu= ll_filter(options, &line[i]))) I find this very hard to understand, even if it's a bit more space-efficien= t than having two `if()` clauses with their own error handling - but the la= tter would make the whole flow easier to understand. Maybe just leaving the `option->pull_filter_list` check inside `apply_pull_= filter()` (as it was) would already make this easier to read. Yes, we'd w= aste a function call per received push-option, but this is not a critical c= ode path. -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/808?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I6ecd4cb47571cc8c20e46de8595c742aeec6064a Gerrit-Change-Number: 808 Gerrit-PatchSet: 21 Gerrit-Owner: mrbff Gerrit-Reviewer: cron2 Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-Reviewer: stipa Gerrit-CC: openvpn-devel Gerrit-Attention: flichtenheld Gerrit-Attention: mrbff Gerrit-Attention: stipa Gerrit-Comment-Date: Sun, 27 Jul 2025 12:19:36 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment --5cGv7Y1ZEVk= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: flichtenheld, mrbff, stipa.

Patch set 21:Code-Review -1

V= iew Change

3 comments:

  • Patchset:

    • Patch Set #21:

      I'm fine with most of the new version, = but I'm still not really happy with `apply_push_options()`. Sorry.

      =
  • File src/openvpn/opt= ions.c:

    • Patch Set #= 21, Line 5524: = {

      plea= se get rid of this extra `if()` level. Both conditions are checked again i= nside, so this is not really adding anything but an indent level.

    • <= li style=3D"margin: 0; padding: 0 0 0 16px;">

      Patch Set #21, Line 5532: || (options->pull_filter_list && !app= ly_pull_filter(options, &line[i])))

      I find this very hard to understand, even= if it's a bit more space-efficient than having two `if()` clauses with= their own error handling - but the latter would make the whole flow easier= to understand.

      Maybe just leaving the `option->pull_filter_list` check inside `apply= _pull_filter()` (as it was) would already make this easier to read. Yes, = we'd waste a function call per received push-option, but this is not a = critical code path.

To view, visit change 808. To unsu= bscribe, or for help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I6ecd4cb47571cc8c20e46de8595= c742aeec6064a
Gerrit-Change-Number: 808
Gerrit-PatchSet: 21
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-Reviewer: stipa <lstipakov@...277...= >
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-Attention: mrbff <marco@...2726...&g= t;
Gerrit-Attention: stipa <lstipakov@...1663...= .>
Gerrit-Comment-Date: Sun, 27 Jul 2025 12:19:36= +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
--5cGv7Y1ZEVk=--