From: "its_Giaan (Code Review)" Date: Tue, 24 Mar 2026 16:20:57 +0000 In-Reply-To: References: Reply-To: gianmarco@...2726..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <43961da5ecb0370e4bea2329d2c96e50868f1045-EmailReviewComments-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="mF7x1WgoGlc="; charset=UTF-8 Subject: [Openvpn-devel] [L] Change in openvpn[master]: Add support for user defined network namespace List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: flichtenheld , plaisthos , openvpn-devel --mF7x1WgoGlc= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, plaisthos. its_Giaan has posted comments on this change by its_Giaan. ( http://gerrit.= openvpn.net/c/openvpn/+/1521?usp=3Demail ) Change subject: Add support for user defined network namespace ...................................................................... Patch Set 7: (5 comments) File src/openvpn/networking.h: http://gerrit.openvpn.net/c/openvpn/+/1521/comment/4ec40e14_ab031002?usp=3D= email : PS6, Line 42: /* Only the iproute2 backend implements these functions, > This comment is outdated Done File src/openvpn/networking_sitnl.h: http://gerrit.openvpn.net/c/openvpn/+/1521/comment/7944c4f7_347e1ae4?usp=3D= email : PS6, Line 113: * (/var/run/netns). > `/run/netns` This part has been removed, so no fix longer needed. File src/openvpn/networking_sitnl.c: http://gerrit.openvpn.net/c/openvpn/+/1521/comment/c17f7f0d_724d403e?usp=3D= email : PS6, Line 207: return -1; > Note that this return value is meaningless since no code ever checks it. = [=E2=80=A6] Done File src/openvpn/tun.c: http://gerrit.openvpn.net/c/openvpn/+/1521/comment/32fdbd8e_d4ad4523?usp=3D= email : PS6, Line 2185: int ret =3D net_iface_move_netns(ifr.ifr_name, = ctx->netns); > One interesting problem I encountered is that the usual way of auto-namin= g tun devices doesn't reall [=E2=80=A6] Thanks for spotting this, that was indeed an intresting problem. We got around this by creating the interface directly into the target names= pace, so auto-naming will continue to work as usually. http://gerrit.openvpn.net/c/openvpn/+/1521/comment/ad76eec1_abbaa8dc?usp=3D= email : PS6, Line 2188: msg(M_WARN | M_ERRNO, "Note: Cannot move de= v %s to network namespace %s", ifr.ifr_name, ctx->netns); > I would go for M_ERR here. I would consider this a fatal error. This part has been removed, so no fix longer needed. -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1521?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: I8b0d1cad7062856abcc40c4e16ec93b45295bbd3 Gerrit-Change-Number: 1521 Gerrit-PatchSet: 7 Gerrit-Owner: its_Giaan Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld Gerrit-Comment-Date: Tue, 24 Mar 2026 16:20:57 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: flichtenheld --mF7x1WgoGlc= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

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

View = Change

5 comments:

  • File src/openvpn/networking.h:

    =
  • File src/openvpn/networking_sitnl.h:

  • File src/openvpn/networking_sitnl.c:

    • Patch Set #6, Line 207:= return -1;

      Note that this return value is meaningless since no code= ever checks it. [=E2=80=A6]

      Done

  • File src/openvpn/tun.c:

    • Patch Set #6, Line 2185= : int ret = =3D net_iface_move_netns(ifr.ifr_name, ctx->netns);

      Thanks for spo= tting this, that was indeed an intresting problem.
      We got around this by= creating the interface directly into the target namespace, so auto-naming = will continue to work as usually.

    • Patch Set #= 6, Line 2188: = msg(M_WARN | M_ERRNO, "Note: Cannot move dev %s to network name= space %s", ifr.ifr_name, ctx->netns);

      I would= go for M_ERR here. I would consider this a fatal error.

      T= his part has been removed, so no fix longer needed.

=

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

Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I8b0d1cad7062856abcc40c4e16e= c93b45295bbd3
Gerrit-Change-Number: 1521
Gerrit-PatchSet: 7
Gerrit-Owner: its_Giaan <gianmarco@...2786...= ..>
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: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-Comment-Date: Tue, 24 Mar 2026 16:20:57= +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: flichtenheld <frank@...1186...= .2641...>
= --mF7x1WgoGlc=--