From: "stipa (Code Review)"
Date: Thu, 6 Feb 2025 18:45:33 +0000
In-Reply-To:
References:
Reply-To: lstipakov@...277..., arne-openvpn@...1227...,
openvpn-devel@lists.sourceforge.net, frank@...2641...,
gert@...1296...
Message-ID: <06d34c764f05cf97aeae1b401f49e0c66284b349-EmailReviewComments-HTML@...2715...>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Disposition: inline
Content-Type: multipart/alternative; boundary="vlGRm8e4x5g="; charset=UTF-8
Subject: [Openvpn-devel] [L] Change in openvpn[master]: dco-win: multipeer
support
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Cc: cron2 , plaisthos , flichtenheld , openvpn-devel
--vlGRm8e4x5g=
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Attention is currently required from: cron2, flichtenheld, plaisthos.
stipa has posted comments on this change. ( http://gerrit.openvpn.net/c/ope=
nvpn/+/815?usp=3Demail )
Change subject: dco-win: multipeer support
......................................................................
Patch Set 19:
(12 comments)
File src/openvpn/dco_win.h:
http://gerrit.openvpn.net/c/openvpn/+/815/comment/4fc86de9_75204ca5 :
PS18, Line 42: dco_mode_type mode;
> I'm not really happy with that. [=E2=80=A6]
Acknowledged
File src/openvpn/dco_win.c:
http://gerrit.openvpn.net/c/openvpn/+/815/comment/958d5b8c_a18c12a8 :
PS18, Line 127:
> A few words of comment somewhere on the call chain "who calls what, in wh=
ich sequence" for p2p and m [=E2=80=A6]
Acknowledged
http://gerrit.openvpn.net/c/openvpn/+/815/comment/23adf9fa_be8de950 :
PS18, Line 132: dco->mode =3D (mode =3D=3D MODE_POINT_TO_POINT) ? dco_m=
ode_p2p : dco_mode_mp;
> that comment is slightly confusing - if it is "already set", then why do =
we set it again?
Acknowledged
http://gerrit.openvpn.net/c/openvpn/+/815/comment/7778dea2_f293c54f :
PS18, Line 146: OVPN_MODE m =3D OVPN_MODE_MP;
> here we have a new define for communication between driver and userland, =
which does the same as `dco [=E2=80=A6]
Yeah, this one is from the driver API. But I see the frustration.
http://gerrit.openvpn.net/c/openvpn/+/815/comment/0dc53053_22601180 :
PS18, Line 291: if (out.ListenAddress.Addr4.sin_family =3D=3D AF_INET)
> This part confuses me. What is `out`? Why is it put into `actual. [=E2=
=80=A6]
The driver writes to out the local transport address of the socket after th=
e bind() call. But we already know the local bind address, except maybe the=
port, we probably don't want to bind to port 0. It seems that there is no =
use of this data, so I'll remove those lines.
http://gerrit.openvpn.net/c/openvpn/+/815/comment/26e4fbd9_488525de :
PS18, Line 393: {
> I do wonder why this is necessary. [=E2=80=A6]
I see. At the moment driver doesn't use local transport address of the peer=
, although this is a part of API. I will remove this code.
File src/openvpn/forward.c:
http://gerrit.openvpn.net/c/openvpn/+/815/comment/ea8ee09a_b0ad999b :
PS18, Line 1326: bool prepend_sa =3D c->options.mode =3D=3D MODE_SE=
RVER && dco_enabled(&c->options);
> we do have `SF_PREPEND_SA` set on the sockflags - is that available here?
Actually we cannot end up here when using DCO. So prepend_sa should be fals=
e and I will add an ASSERT(!dco_enabled(&c->options));
File src/openvpn/ovpn_dco_win.h:
http://gerrit.openvpn.net/c/openvpn/+/815/comment/98441252_eacace58 :
PS18, Line 120: } OVPN_CRYPTO_DATA_V2, * POVPN_CRYPTO_DATA_V2;
> these two are not part of *this* patch set, and might need revisiting for=
"the new epoch thing"
Acknowledged
File src/openvpn/socket.c:
http://gerrit.openvpn.net/c/openvpn/+/815/comment/9f6896eb_6e2a0bdf :
PS18, Line 2256: else
> since there is a "goto done" in the `if()` we could get rid of the `else`=
and the dangling brackets [=E2=80=A6]
Acknowledged
http://gerrit.openvpn.net/c/openvpn/+/815/comment/be0ef538_110ecee4 :
PS18, Line 3857: sa_len =3D sizeof(struct sockaddr_in);
> the repetition of `sizeof(struct sockaddr_in)` makes my eyes hurt... [=E2=
=80=A6]
Acknowledged
http://gerrit.openvpn.net/c/openvpn/+/815/comment/c8f0d980_977d5293 :
PS18, Line 3867: sa_len =3D sizeof(struct sockaddr_in6);
> same here
Acknowledged
http://gerrit.openvpn.net/c/openvpn/+/815/comment/69e4d1f0_887d9531 :
PS18, Line 3957: read_sockaddr_from_overlapped(io, &from->dest.addr=
.sa, ret);
> I do not understand these two `sh.is_handle` cases. [=E2=80=A6]
SH could be either file descriptor (in case of non-dco link) or handle (non=
-dco tun and dco link).
`from` is NULL in case of non-dco tun and read tcp link - but my patch hasn=
't changed that.
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/815?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: Ia267276d61fa1425ba205f54ba6eb89021f32dba
Gerrit-Change-Number: 815
Gerrit-PatchSet: 19
Gerrit-Owner: stipa
Gerrit-Reviewer: cron2
Gerrit-Reviewer: flichtenheld
Gerrit-Reviewer: plaisthos
Gerrit-CC: openvpn-devel
Gerrit-Attention: plaisthos
Gerrit-Attention: cron2
Gerrit-Attention: flichtenheld
Gerrit-Comment-Date: Thu, 06 Feb 2025 18:45:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: cron2
Gerrit-MessageType: comment
--vlGRm8e4x5g=
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Attention is currently required from: cron2, flichtenheld, plaisthos. <=
/p>
<=
blockquote style=3D"border-left: 1px solid #aaa; margin: 10px 0; padding: 0=
10px;">This part confuses me. What is `out`? Why is it put into `actual.=
[=E2=80=A6]
The driver writes to out the local transport address of the so=
cket after the bind() call. But we already know the local bind address, exc=
ept maybe the port, we probably don't want to bind to port 0. It seems =
that there is no use of this data, so I'll remove those lines.