From: "ralf_lici (Code Review)"
Date: Sat, 21 Dec 2024 15:23:08 +0000
In-Reply-To:
References:
Reply-To: ralf@...2726..., arne-openvpn@...1227...,
openvpn-devel@lists.sourceforge.net, frank@...2641...,
gert@...1296...
Message-ID: <85d1cbd99244998c8632fb89a095d70d03466b48-EmailReviewComments-HTML@...2715...>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Disposition: inline
Content-Type: multipart/alternative; boundary="EVmA6ECMwZY="; charset=UTF-8
Subject: [Openvpn-devel] [S] Change in openvpn[master]: Fix float support in
P2P topology
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Cc: cron2 , plaisthos , flichtenheld , openvpn-devel
--EVmA6ECMwZY=
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Attention is currently required from: cron2, flichtenheld, plaisthos.
ralf_lici has posted comments on this change. ( http://gerrit.openvpn.net/c=
/openvpn/+/844?usp=3Demail )
Change subject: Fix float support in P2P topology
......................................................................
Patch Set 1:
(4 comments)
File src/openvpn/forward.c:
http://gerrit.openvpn.net/c/openvpn/+/844/comment/a2f4224f_180af603 :
PS1, Line 1238: if (remote && (family =3D=3D AF_INET || family =3D=3D A=
F_INET6))
> I'm not sure what *that* does? When can we ever have a `remote` and an f=
amily that is neither `AF_I [=E2=80=A6]
Acknowledged
http://gerrit.openvpn.net/c/openvpn/+/844/comment/ed3d6af5_b5a33468 :
PS1, Line 1245: if (floated && c->c2.buf.len > 0)
> the GC seems only used inside here, and since this is a performance relev=
ant function ("hot path", e [=E2=80=A6]
Definitely, I think I forgot to reorder this when I removed the other debug=
ging prints I used for testing purposes. Acknowledged.
http://gerrit.openvpn.net/c/openvpn/+/844/comment/34c401d6_00f96d38 :
PS1, Line 1251: tls_update_remote_addr
Tested the non-tls p2p configuration (`--secret`) and realized that this li=
ne obviously segfaults. Sorry for this, I will fix it on the next patch.
http://gerrit.openvpn.net/c/openvpn/+/844/comment/ee561cd1_89c6d5cc :
PS1, Line 1253: process_incoming_link_part2(c, lsi, orig_buf);
> should this be *inside* the `if()`? In the old code `_part2()` is uncond=
itionally called always
AFAICT the output of `_part1()` is correlated with `c->c2.buf.len` such tha=
t `buf.len` is always <=3D 0 if `_part1()` returns false (though the revers=
e isn't always true). Since `_part2()` processes a packet only if `buf.len =
> 0`, it seems safe to call `_part2()` only if `_part1()` returns true. How=
ever, as the current implementation works and I=E2=80=99m not entirely cert=
ain, I suggest leaving it as is unless there=E2=80=99s a strong reason to s=
witch to conditional execution. What do you think?
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/844?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: I806757a8c6f9a589665624f176391b5f7b87f581
Gerrit-Change-Number: 844
Gerrit-PatchSet: 1
Gerrit-Owner: ralf_lici
Gerrit-Reviewer: flichtenheld
Gerrit-Reviewer: plaisthos
Gerrit-CC: cron2
Gerrit-CC: openvpn-devel
Gerrit-Attention: plaisthos
Gerrit-Attention: cron2
Gerrit-Attention: flichtenheld
Gerrit-Comment-Date: Sat, 21 Dec 2024 15:23:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: cron2
Gerrit-MessageType: comment
--EVmA6ECMwZY=
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Attention is currently required from: cron2, flichtenheld, plaisthos. <=
/p>
View C=
hange
4 comments:
AFAICT the output of `_part1()` is correla=
ted with `c->c2.buf.len` such that `buf.len` is always <=3D 0 if `_pa=
rt1()` returns false (though the reverse isn't always true). Since `_pa=
rt2()` processes a packet only if `buf.len > 0`, it seems safe to call `=
_part2()` only if `_part1()` returns true. However, as the current implemen=
tation works and I=E2=80=99m not entirely certain, I suggest leaving it as =
is unless there=E2=80=99s a strong reason to switch to conditional executio=
n. What do you think?
To view, visit change 844. To un=
subscribe, or for help writing mail filters, visit settings.
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I806757a8c6f9a589665624f1763=
91b5f7b87f581
Gerrit-Change-Number: 844
Gerrit-PatchSet: 1
Gerrit-Owner: ralf_lici <ralf@...2726...>=
;
Gerrit-Reviewer: flichtenheld <frank@...2716...=
1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...=
.1227...>
Gerrit-CC: cron2 <gert@...1296...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...=
ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...=
..1227...>
Gerrit-Attention: cron2 <gert@...1296...>=
;
Gerrit-Attention: flichtenheld <frank@...2375...=
41...>
Gerrit-Comment-Date: Sat, 21 Dec 2024 15:23:08=
+0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: cron2 <gert@...1296...=
>
Gerrit-MessageType: comment
--EVmA6ECMwZY=--