]> git.ipfire.org Git - thirdparty/openvpn.git/commit
tapctl: generate driver-specific adapter names
authorLev Stipakov <lev@openvpn.net>
Fri, 19 May 2023 08:25:48 +0000 (11:25 +0300)
committerGert Doering <gert@greenie.muc.de>
Sun, 21 May 2023 15:26:18 +0000 (17:26 +0200)
commit868286fa756f7faf768bdd7e18a44e6a92e47066
treea59b7f465c6a173241659da93e64dd5006babc0e
parent9e112be5dde043cdc1f073f33ada0a1810b730a6
tapctl: generate driver-specific adapter names

At the moment if --name is not specified, adapter names
are generated by Windows and they look a bit confusing
like "Local Area Connection 2".

This is also behavior of "Add a new <driver-name> virtual network
adapter" shortcuts.

This makes tapctl generate driver-specific names for adapters
if --name is missing, inclusing resolving duplicates. For instance
following commands:

  tapctl.exe create --hwid ovpn-dco

will create an adapter named

  OpenVPN Data Channel Offload

If the name is taken, the next one will be

  OpenVPN Data Channel Offload #1

and so on up to 100.

Fixes https://github.com/OpenVPN/openvpn/issues/337

Change-Id: Ic5afb470d14ac7b231d91f0f5de0a0046043a7e0
Signed-off-by: Lev Stipakov <lev@openvpn.net>
Acked-by: Selva Nair <selva.nair@gmail.com>
Message-Id: <20230519082548.1714-1-lstipakov@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26712.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 4323b8277814495f5a9a24d3225679c6e7a971a4)
src/tapctl/main.c