From: "cron2 (Code Review)"
Date: Tue, 18 Feb 2025 17:35:06 +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="KaJ8P/sU0Lk="; charset=UTF-8
Subject: [Openvpn-devel] [L] Change in openvpn[master]: Add support for
simultaneous use of UDP and TCP sockets
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
To: its_Giaan
Cc: flichtenheld , plaisthos , openvpn-devel
--KaJ8P/sU0Lk=
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Attention is currently required from: its_Giaan, ordex, plaisthos.
cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/ope=
nvpn/+/764?usp=3Demail )
Change subject: Add support for simultaneous use of UDP and TCP sockets
......................................................................
Patch Set 19: Code-Review-2
(10 comments)
Patchset:
PS19:
more comments, but these are mostly minor and/or nothing new. The main thi=
ng that must be fixed remains the gremlin crash...
File src/openvpn/multi.h:
http://gerrit.openvpn.net/c/openvpn/+/764/comment/acd4850a_3fd5d5d9 :
PS19, Line 256: * on the transport protocols:
The wording is a bit odd... since we do no longer need to point out that th=
is calls "tcp and udp!!" I'd just make this
```
* Main event loop for OpenVPN in server mode
```
(yes it will call `tunnel_server_loop()` but that's not really relevant her=
e, is it?)
File src/openvpn/multi.c:
http://gerrit.openvpn.net/c/openvpn/+/764/comment/002a17a2_4cb6329f :
PS18, Line 609: bool is_dgram =3D proto_is_dgram(mi->context.c2.link_so=
ckets[0]->info.proto);
> It is, the 'mi' tells you that this is a client-instance context.
Done
File src/openvpn/multi_io.c:
http://gerrit.openvpn.net/c/openvpn/+/764/comment/4c1453d0_3cacda0f :
PS19, Line 145: !proto_is_dgram(mi->context.c2.link_sock=
ets[0]->info.proto) ? &mi->tcp_rwflags : NULL);
I like that this is being moved to a dedicated function :-) - I would style=
it differently, though, not "one fat function call with two conditionals i=
n it".
Maybe start with `if (!mi) { return; }` (early return, save indent space) a=
nd then have a surrounding `if(proto_is_dgram) { ...}` with one `socket_set=
()` call in each branch?
... also, why are we not storing `ev_arg` in the `&mi` for both cases?
http://gerrit.openvpn.net/c/openvpn/+/764/comment/5d6f18e7_d50503ba :
PS19, Line 491: }
since this is the same `if (mi)` now, it could go outside one level, avoid =
code duplication... and make the comment "protocol invariant" (`/* monitor=
and/or handle events that are triggered...` without mentioning `TCP`)
File src/openvpn/openvpn.h:
http://gerrit.openvpn.net/c/openvpn/+/764/comment/ce61719a_f2258f18 :
PS19, Line 219: * tunnel_point_to_point(), \c tunnel_server() \c
an `and` is missing before `tunnel_server()` (since it's only these 2 func=
tions now)
File src/openvpn/options.c:
http://gerrit.openvpn.net/c/openvpn/+/764/comment/3dbf2e3f_8940878c :
PS18, Line 3351: if (!le->proto)
> Acknowledged
it says `acknowledged` but we still have no comment for `proto`? ;-)
http://gerrit.openvpn.net/c/openvpn/+/764/comment/ad01e4f2_8599b78a :
PS18, Line 3839:
> Acknowledged
so what does "Acknowledged" mean, here? "Will be handled in a future patch=
"?
File src/openvpn/options.c:
http://gerrit.openvpn.net/c/openvpn/+/764/comment/873691f9_0977c2fe :
PS19, Line 1747: o->local_list->array[i]->port);
I think this should show `proto` now as well, otherwise the log is a bit ha=
rd to read if trying to understand why a `bind()` fails.
File src/openvpn/socket.c:
http://gerrit.openvpn.net/c/openvpn/+/764/comment/e7e767ef_7f49bef8 :
PS18, Line 1914: ASSERT(c->c2.link_sockets[sock_index]);
> Done
maybe gerrit is playing tricks on me, but the `ASSERT()` seems to be still =
here
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/764?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: I31bbf87e4e568021445c7512ecefadfd4a69b363
Gerrit-Change-Number: 764
Gerrit-PatchSet: 19
Gerrit-Owner: its_Giaan
Gerrit-Reviewer: cron2
Gerrit-Reviewer: flichtenheld
Gerrit-Reviewer: plaisthos
Gerrit-CC: openvpn-devel
Gerrit-CC: ordex
Gerrit-Attention: plaisthos
Gerrit-Attention: its_Giaan
Gerrit-Attention: ordex
Gerrit-Comment-Date: Tue, 18 Feb 2025 17:35:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: its_Giaan
Comment-In-Reply-To: cron2
Gerrit-MessageType: comment
--KaJ8P/sU0Lk=
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Attention is currently required from: its_Giaan, ordex, plaisthos.
Patch set 19:Code-Review -2
V=
iew Change
10 comments:
more comments, but these are mostly minor =
and/or nothing new. The main thing that must be fixed remains the gremlin =
crash...
File src=
/openvpn/multi.h:
=
Patch Set #19, Line 256: * on the transport protocols:
The wording is a bit odd... since we do no longe=
r need to point out that this calls "tcp and udp!!" I'd just =
make this
```
* Main event loop for OpenVPN in server mode
```
=
(yes it will cal=
l `tunnel_server_loop()` but that's not really relevant here, is it?)=
p>
File src/openvpn/m=
ulti.c:
File src/openvpn/multi_io.c:
Patch Set #19, Line 145: !proto_is_dgram(mi->context.=
c2.link_sockets[0]->info.proto) ? &mi->tcp_rwflags : NULL);
I like that=
this is being moved to a dedicated function :-) - I would style it differe=
ntly, though, not "one fat function call with two conditionals in it&q=
uot;.
Maybe s=
tart with `if (!mi) { return; }` (early return, save indent space) and then=
have a surrounding `if(proto_is_dgram) { ...}` with one `socket_set()` cal=
l in each branch?
... also, why are we not storing `ev_arg` in the `&mi` for both ca=
ses?
Patch Set #19, Line 491: }
since this is the same `if (mi)=
` now, it could go outside one level, avoid code duplication... and make t=
he comment "protocol invariant" (`/* monitor and/or handle events=
that are triggered...` without mentioning `TCP`)
File src/openvpn/openvpn.h:
Patch Set #19, Line 219: * tunnel_point_to_point(), \=
c tunnel_server() \c
an `and` is missing before `tunnel_server()` (since it'=
s only these 2 functions now)
File src/openvpn/options.c:
Patch Set #18, Line 3351: if (!le->proto)
Ackno=
wledged
it says `acknowledged` but we still have no comment for `proto`? ;-=
)
Patch Set #18, Line 3839:
Acknowledged
<=
p style=3D"white-space: pre-wrap; word-wrap: break-word;">so what does &quo=
t;Acknowledged" mean, here? "Will be handled in a future patch&q=
uot;?
File src/op=
envpn/options.c:
=
Patch Set #19, Line 1747: o->local_list->array[i]->port);
I think this should show=
`proto` now as well, otherwise the log is a bit hard to read if trying to =
understand why a `bind()` fails.
File src/openvpn/socket.c:
Patch Set #18, Line 1914: ASSERT(c->c2.link_sockets[sock_index]);=
code>
Done
maybe gerrit is playing tricks on me, but the `AS=
SERT()` seems to be still here
To view, visit change 764=
a>. To unsubscribe, or for help writing mail filters, visit settings.
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I31bbf87e4e568021445c7512ece=
fadfd4a69b363
Gerrit-Change-Number: 764
Gerrit-PatchSet: 19
Gerrit-Owner: its_Giaan <gianmarco@...2786...=
..>
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-CC: ordex <a@...2181...>
Gerrit-Attention: plaisthos <arne-openvpn@...220...=
..1227...>
Gerrit-Attention: its_Giaan <gianmarco@...1665...=
726...>
Gerrit-Attention: ordex <a@...2181...> <=
/div>
Gerrit-Comment-Date: Tue, 18 Feb 2025 17:35:06=
+0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: its_Giaan <gianmarco@...220...=
..2726...>
Comment-In-Reply-To: cron2 <gert@...1296...=
>
Gerrit-MessageType: comment
--KaJ8P/sU0Lk=--