From: "cron2 (Code Review)" Date: Mon, 30 Dec 2024 19:04:42 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., gianmarco@...2726..., openvpn-devel@lists.sourceforge.net, frank@...2641..., a@...2181... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="IN3HbXzW5YA="; charset=UTF-8 Subject: [Openvpn-devel] [M] Change in openvpn[master]: allow user to specify 'local' multiple times in config files List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: its_Giaan Cc: flichtenheld , plaisthos , openvpn-devel --IN3HbXzW5YA= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, its_Giaan, ordex, plais= thos. cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/ope= nvpn/+/436?usp=3Demail ) Change subject: allow user to specify 'local' multiple times in config files ...................................................................... Patch Set 10: Code-Review-1 (4 comments) Patchset: PS10: This works, but I find the `local_list` structure in need of improvement. File src/openvpn/options.h: http://gerrit.openvpn.net/c/openvpn/+/436/comment/b51da7c8_0ec98e70 : PS10, Line 105: struct local_list *local_list; I do not like this data structure - having an extra indirection seems to se= rve no good purpose (like, it's not actually a "list"). All the other new multisocket code just has a local array, and I think we s= hould do the same thing here - that is: `struct connection_entry { struct local_entry *local_list; int local_list_len; ... ` most of the remaining code will simplify itself (`ce->local_list->array[i]`= to `ce->local_list[i]` etc.) or will not care at all (if dealing with a `l= e`). File src/openvpn/options.c: http://gerrit.openvpn.net/c/openvpn/+/436/comment/b6ab664e_ab058053 : PS10, Line 2476: msg(M_USAGE, "--remote and a --local addresses= are the same"); `a local address`, singular :-) (or `one of the --local addresses`) Dunno. Something grammarly correct :-) File src/openvpn/socket.c: http://gerrit.openvpn.net/c/openvpn/+/436/comment/fc6cd992_13935a2b : PS10, Line 421: for (int j =3D 0; j < ce->local_list->len; j++) is this save against "no `--local` specified at all, list not initialized"?= The old code had an `if (ce->bind_local)` check here, for which I'm missi= ng the equivalent -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/436?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: I4d1c96662c5a8c750d883e3b20adde09529e2764 Gerrit-Change-Number: 436 Gerrit-PatchSet: 10 Gerrit-Owner: ordex Gerrit-Reviewer: cron2 Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: its_Giaan Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: its_Giaan Gerrit-Attention: flichtenheld Gerrit-Attention: ordex Gerrit-Comment-Date: Mon, 30 Dec 2024 19:04:42 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment --IN3HbXzW5YA= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: flichtenheld, its_Giaan, ordex, p= laisthos.

Patch set 10:Code-Review -1

V= iew Change

4 comments:

  • Patchset:

    • Patch Set #10:

      This works, but I find the `local_list` str= ucture in need of improvement.

  • File src/openvpn/options.h:

    • Patch Set #10, Line 105: struct local_list *local_list;

      I do not like this da= ta structure - having an extra indirection seems to serve no good purpose (= like, it's not actually a "list").

      All the other new multisocket code just= has a local array, and I think we should do the same thing here - that is:=

      `struct connection_entry
      {
      struct local_entry *local_list;
      = int local_list_len;
      ...
      `

      most of the remaining code will simplify itself = (`ce->local_list->array[i]` to `ce->local_list[i]` etc.) or will n= ot care at all (if dealing with a `le`).

  • File src/openvpn/options.c:

    • Patch Set #10, Line 2476: msg(M_USAGE, "--remot= e and a --local addresses are the same");

      `a local address`, singular :-) (o= r `one of the --local addresses`)

      Dunno. Something grammarly correct :-)

    <= /li>
  • File src/openvpn/socket.c:

    <= ul style=3D"list-style: none; padding: 0;">
  • Patch Set #10, Line 421= : for (int j = =3D 0; j < ce->local_list->len; j++)

    is this save against "no `--lo= cal` specified at all, list not initialized"? The old code had an `if= (ce->bind_local)` check here, for which I'm missing the equivalent<= /p>

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

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I4d1c96662c5a8c750d883e3b20a= dde09529e2764
Gerrit-Change-Number: 436
Gerrit-PatchSet: 10
Gerrit-Owner: ordex <a@...2181...>
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: its_Giaan <gianmarco@...1664...= 26...>
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: its_Giaan <gianmarco@...1665...= 726...>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-Attention: ordex <a@...2181...> <= /div>
Gerrit-Comment-Date: Mon, 30 Dec 2024 19:04:42= +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
--IN3HbXzW5YA=--