From: "plaisthos (Code Review)" Date: Mon, 13 Oct 2025 15:01:15 +0000 In-Reply-To: References: Reply-To: arne-openvpn@...1227..., marco@...2726..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="6IYntEuNxVI="; charset=UTF-8 Subject: [Openvpn-devel] [L] Change in openvpn[master]: route: extended logic to omit gateway when unnecessary List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: mrbff Cc: flichtenheld , openvpn-devel --6IYntEuNxVI= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, mrbff. plaisthos has posted comments on this change by mrbff. ( http://gerrit.open= vpn.net/c/openvpn/+/721?usp=3Demail ) Change subject: route: extended logic to omit gateway when unnecessary ...................................................................... Patch Set 11: Code-Review-2 (7 comments) Patchset: PS11: I am seriously confused by this PR. The premise of the PR seems that routes= that are setup on the startup of OpenVPN (CM_TOP) need to be handled diffe= rrent than routes on the startup of a client or routes that are added later= , e.g. by CCD files but I do not see a strong reason why these initial rout= es should be special in that regard. File src/openvpn/route.h: http://gerrit.openvpn.net/c/openvpn/+/721/comment/c375c7a6_648618a0?usp=3De= mail : PS11, Line 274: bool add_route_ipv6(struct route_ipv6 *r, const struct tunt= ap *tt, unsigned int flags, const struct env_set *es, openvpn_net_ctx_t *ct= x, const bool is_multipoint); The naming here and the usage seem to disagree. `is_multipoint` sounds like= the usage in a p2mp server context but the actual usage is that this flag = is only used for the CM_TOP instance, which is more the initialisation of p= 2mp on startup. So this naming is quite confusing here. Also why adding a flag as bool to the function vs adding it as extra flag i= n the route structure. File src/openvpn/route.c: http://gerrit.openvpn.net/c/openvpn/+/721/comment/d77240b0_a0c41a4e?usp=3De= mail : PS11, Line 1811: /* FIXME -- add on-link support for Dragonfly */ Has this been really tested on DragonFly BSD? http://gerrit.openvpn.net/c/openvpn/+/721/comment/f8856fdf_5f40d6a4?usp=3De= mail : PS11, Line 1600: && !( (r4->flags & RT_METRIC_DEFINED) && r4->metri= c =3D=3D 0 ) ) how does the metric play into needing a gateway or not? http://gerrit.openvpn.net/c/openvpn/+/721/comment/ac755fc1_a42389d2?usp=3De= mail : PS11, Line 1607: return true; A little bit of explanation why DCO is different is needed. http://gerrit.openvpn.net/c/openvpn/+/721/comment/657a25df_8073c041?usp=3De= mail : PS11, Line 1898: } Has this been tested on Open and NetBSD? http://gerrit.openvpn.net/c/openvpn/+/721/comment/715e26fa_29fc79e0?usp=3De= mail : PS11, Line 2010: { I think this duplicates the code that was publicly accessible in https://ge= rrit.openvpn.net/c/openvpn/+/1191 -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/721?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: I87777e74b1fd34781e1d72c9f994eb84f39d800c Gerrit-Change-Number: 721 Gerrit-PatchSet: 11 Gerrit-Owner: mrbff Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: flichtenheld Gerrit-Attention: mrbff Gerrit-Comment-Date: Mon, 13 Oct 2025 15:01:15 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes --6IYntEuNxVI= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: flichtenheld, mrbff.

Patch set 11:Code-Review -2

V= iew Change

7 comments:

  • Patchset:

    • Patch Set #11:

      I am serio= usly confused by this PR. The premise of the PR seems that routes that are = setup on the startup of OpenVPN (CM_TOP) need to be handled differrent than= routes on the startup of a client or routes that are added later, e.g. by = CCD files but I do not see a strong reason why these initial routes should = be special in that regard.

  • File src/openvpn/route.h:

    • Patch Set #11, Line 274: bool add_route_ipv6(struct route_ipv6 *r, co= nst struct tuntap *tt, unsigned int flags, const struct env_set *es, openvp= n_net_ctx_t *ctx, const bool is_multipoint);

      The naming here and= the usage seem to disagree. `is_multipoint` sounds like the usage in a p2m= p server context but the actual usage is that this flag is only used for th= e CM_TOP instance, which is more the initialisation of p2mp on startup. So = this naming is quite confusing here.

      Also why adding a flag as bool to = the function vs adding it as extra flag in the route structure.

    • File src/openvpn/route.c:

    To view, visit change 721. To unsubscribe, or for help wr= iting mail filters, visit settings.

    <= /div>
    Gerrit-MessageType: comment
    Gerrit-Project: openvpn
    Gerrit-Branch: master
    Gerrit-Change-Id: I87777e74b1fd34781e1d72c9f99= 4eb84f39d800c
    Gerrit-Change-Number: 721
    Gerrit-PatchSet: 11
    Gerrit-Owner: mrbff <marco@...2726...> <= /div>
    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: flichtenheld <frank@...2375...= 41...>
    Gerrit-Attention: mrbff <marco@...2726...&g= t;
    Gerrit-Comment-Date: Mon, 13 Oct 2025 15:01:15= +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    = --6IYntEuNxVI=--