]> 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:25:48 +0000 (17:25 +0200)
commit4323b8277814495f5a9a24d3225679c6e7a971a4
tree655ae38d813d654235df8ff71e979edf7e5b8cd6
parent244d9b7942dabf0297c8f689457eeb0f9fa0aa1e
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>
src/tapctl/main.c