From: "ordex (Code Review)" Date: Mon, 16 Feb 2026 23:24:53 +0000 References: Reply-To: antonio@...2726..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net Message-ID: <974aa7f78ea6fb0ff4e0452d6555ba0849844bbd-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="oPuy+nXzax8="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: options: make `tun` the default for `--dev` List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos Cc: openvpn-devel --oPuy+nXzax8= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/1537?usp=3Demail to review the following change. Change subject: options: make `tun` the default for `--dev` ...................................................................... options: make `tun` the default for `--dev` With this change, OpenVPN can be launched without specifying any --dev option and it will start a `tun` (L3) tunnel with the interface named `tunX`. As before, this behaviour can be changed using --dev or --dev-type. Existing configs won't see any behavioural change as they all had to contain at least one --dev directive. Change-Id: I0ca7b5b7ec1a01acaad222c99db137c94c88555a Signed-off-by: Antonio Quartulli --- M Changes.rst M src/openvpn/options.c 2 files changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/37/1537/1 diff --git a/Changes.rst b/Changes.rst index 36af4e7..1d6c166 100644 --- a/Changes.rst +++ b/Changes.rst @@ -1,6 +1,14 @@ Overview of changes in 2.8 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D - +User-visible Changes +-------------------- +- Default for ``--dev`` is now ``tun``. This implies that, unless another + name is specified, the OpenVPN interface will always be named ``tunX``. + More importantly, this means that by default OpenVPN will start a L3 + tunnel. + Since ``--dev`` had no default value until now, all existing + configurations will behave exactly the same because they all had to + contain one ``--dev`` directive. Overview of changes in 2.7 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 4e1e32a..9081d1d 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -799,6 +799,7 @@ gc_init(&o->dns_options.gc); o->mode =3D MODE_POINT_TO_POINT; + o->dev =3D "tun"; o->topology =3D TOP_UNDEF; o->ce.proto =3D PROTO_UDP; o->ce.af =3D AF_UNSPEC; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1537?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: newchange Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I0ca7b5b7ec1a01acaad222c99db137c94c88555a Gerrit-Change-Number: 1537 Gerrit-PatchSet: 1 Gerrit-Owner: ordex Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos --oPuy+nXzax8= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: plaisthos.

ordex would like plaisthos to review this change.

V= iew Change

options: make `tun` the default for `--dev`=


With this change, OpenVPN can be launched without specifying
any= --dev option and it will start a `tun` (L3) tunnel with the
interface n= amed `tunX`.
As before, this behaviour can be changed using --dev or --d= ev-type.

Existing configs won't see any behavioural change as th= ey all
had to contain at least one --dev directive.

Change-Id: I0= ca7b5b7ec1a01acaad222c99db137c94c88555a
Signed-off-by: Antonio Quartulli= <antonio@...2726...>
---
M Changes.rst
M src/openvpn/option= s.c
2 files changed, 10 insertions(+), 1 deletion(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/37/153=
7/1
diff --git a/Changes.rst b/Changes.rst
index 36= af4e7..1d6c166 100644
--- a/Changes.rst
+++= b/Changes.rst
@@ -1,6 +1,14 @@
Overview o= f changes in 2.8
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
-
+U= ser-visible Changes
+= --------------------
= +- Default for ``--dev`` is now ``tun``. This implies that, unless another<= /span>
+ name is specified,= the OpenVPN interface will always be named ``tunX``.
+ More importantly, this means that by de= fault OpenVPN will start a L3
+ tunnel.
+= Since ``--dev`` had no default value until now, all existing
+ configurations will behave exa= ctly the same because they all had to

+ contain one ``--dev`` directive.

Overview of changes in 2.7
=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
diff --git a/src/openvpn/options.c b/src/openvpn/options.c

index 4e1e32a..9081d1d 100644
--- a/src/openvpn/options.c=
+++ b/src/openvpn/options.c
@@ -799,6 +799= ,7 @@
gc_init(&o->dns_options.gc);

o->mode =3D MODE_POINT_TO_POINT;
+ o->dev =3D "tun"= ;;
o->topology =3D TOP_UNDEF;
= o->ce.proto =3D PROTO_UDP;
o->ce.af =3D AF_UNSPE= C;

To view, visit change 1537. To unsubscri= be, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I0ca7b5b7ec1a01acaad222c99db= 137c94c88555a
Gerrit-Change-Number: 1537
Gerrit-PatchSet: 1
Gerrit-Owner: ordex <antonio@...2726...>=
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
= --oPuy+nXzax8=--