From: "flichtenheld (Code Review)" Date: Mon, 9 Mar 2026 13:10:53 +0000 In-Reply-To: References: Reply-To: frank@...2641..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, ralf@...2726... Message-ID: <62e27b41e2072502651f06b166003a105df0cc6c-EmailReviewComments-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="pXzCdJma2Tc="; charset=UTF-8 Subject: [Openvpn-devel] [L] Change in openvpn[master]: options: add IPv4 CIDR parsing for relevant directives List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: ralf_lici Cc: plaisthos , openvpn-devel --pXzCdJma2Tc= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: plaisthos, ralf_lici. flichtenheld has posted comments on this change by ralf_lici. ( http://gerr= it.openvpn.net/c/openvpn/+/739?usp=3Demail ) Change subject: options: add IPv4 CIDR parsing for relevant directives ...................................................................... Patch Set 9: Code-Review-1 (5 comments) File doc/man-sections/server-options.rst: http://gerrit.openvpn.net/c/openvpn/+/739/comment/6c774407_c41b8c34?usp=3De= mail : PS9, Line 309: view. I would find it a bit easier to read if this was more explicit. Maybe add s= omething like "So the server will actually push ``ifconfig alias remote/net= mask`` to the client"? File src/openvpn/options.c: http://gerrit.openvpn.net/c/openvpn/+/739/comment/35d57942_8451aec7?usp=3De= mail : PS9, Line 7288: const int lev =3D M_WARN; Please fix to msglvl_t http://gerrit.openvpn.net/c/openvpn/+/739/comment/9c9d016a_9cface99?usp=3De= mail : PS9, Line 7688: remote_netmask =3D getaddr(GETADDR_HOST_ORDER | GET= ADDR_RESOLVE, ifconfig_push_parms[2], 0, A bit absurd that we need to parse netmask here again if we generated it be= fore. But probably not worth trying to optimize that away. File src/openvpn/options_util.c: http://gerrit.openvpn.net/c/openvpn/+/739/comment/8d1749e3_5a891d4c?usp=3De= mail : PS9, Line 232: * socket_util.c dependencies into options_util unit-tes= t targets. */ This feels like a weak justification to duplicate code. File tests/unit_tests/openvpn/test_options_parse.c: http://gerrit.openvpn.net/c/openvpn/+/739/comment/ab0e93b7_3d53fbba?usp=3De= mail : PS9, Line 330: test_convert_ipv4_cidr_parms_coverage(void **state) This does not feel like it provides actual "coverage". The examples are all= too similar. To get coverage you should test a bigger variety of "bits" (m= aybe throw a "0" and a "32" in there at least?) and more interesting varian= ts of input parameters (even if they are not currently realistic). E.g. use= minimal and maximal values for network_idx and max_idx. Also include the case where the network parameter is a DNS name -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/739?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: comment Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Iae04ad8715e40dfc76475c2c5b9a766c9604efc9 Gerrit-Change-Number: 739 Gerrit-PatchSet: 9 Gerrit-Owner: ralf_lici Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: ralf_lici Gerrit-Comment-Date: Mon, 09 Mar 2026 13:10:53 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes --pXzCdJma2Tc= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: plaisthos, ralf_lici.

Patch set 9:Code-Review -1=

Vi= ew Change

5 comments:

  • File doc/man-sections/server-op= tions.rst:

    • Patch Set #9, Line 309: view.

      I would find it a bit easier to read if this was mo= re explicit. Maybe add something like "So the server will actually pus= h ``ifconfig alias remote/netmask`` to the client"?

  • =
  • File src/openvpn/options.c:

    • Patch Set #9, = Line 7288: cons= t int lev =3D M_WARN;

      Please fix to msglvl_t

    • Patch Set #9, Line 7688: remote_netmask =3D getaddr(GETADDR_HOST_ORDER | GETAD= DR_RESOLVE, ifconfig_push_parms[2], 0,

      A bit absurd that we nee= d to parse netmask here again if we generated it before. But probably not w= orth trying to optimize that away.

  • File src/openvpn/options_util.c:

    • Patch Set #9, Line 232: * socket_util.c dependenc= ies into options_util unit-test targets. */

      This feels like a we= ak justification to duplicate code.

  • File tests/unit_tests/openvpn/test_options_parse.c:

    <= ul style=3D"list-style: none; padding: 0;">
  • Patch Set #= 9, Line 330: test_conve= rt_ipv4_cidr_parms_coverage(void **state)

    This does not feel lik= e it provides actual "coverage". The examples are all too similar= . To get coverage you should test a bigger variety of "bits" (may= be throw a "0" and a "32" in there at least?) and more = interesting variants of input parameters (even if they are not currently re= alistic). E.g. use minimal and maximal values for network_idx and max_idx.<= /p>

    Also include the case where the network parameter is a DNS name

To view, visit change 739. To unsubscribe, or for help writin= g mail filters, visit settings.

Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iae04ad8715e40dfc76475c2c5b9= a766c9604efc9
Gerrit-Change-Number: 739
Gerrit-PatchSet: 9
Gerrit-Owner: ralf_lici <ralf@...2726...>= ;
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: ralf_lici <ralf@...2804...= .>
Gerrit-Comment-Date: Mon, 09 Mar 2026 13:10:53= +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
= --pXzCdJma2Tc=--