aboutsummaryrefslogtreecommitdiff
path: root/src/openvpnmsica
diff options
context:
space:
mode:
authorSimon Rozman2020-03-09 14:17:26 +0100
committerGert Doering2020-03-24 16:03:15 +0100
commit50d68142f0926850122a78a6ca661d6778efacb3 (patch)
tree125aaca63f28238216c99bbe55b16138437d6acb /src/openvpnmsica
parentd263e4f300553ea77f1bf16538bcd0e81ed2e302 (diff)
downloadopenvpn-50d68142f0926850122a78a6ca661d6778efacb3.zip
openvpn-50d68142f0926850122a78a6ca661d6778efacb3.tar.gz
openvpnmsica, tapctl: Revise default hardware ID management
tap_create_adapter() and tap_list_adapter() no longer default to "root\tap0901". Defining a default hardware ID value is at the responsibility of upper layers that process user desires. Since the tap_list_adapter() no longer defaults the hardware ID to anything, its behavior was simplified to return all existing adapters when a NULL hardware ID is specified. Signed-off-by: Simon Rozman <simon@rozman.si> Acked-by: Lev Stipakov <lstipakov@gmail.com> Message-Id: <20200309131728.380-10-simon@rozman.si> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg19524.html Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'src/openvpnmsica')
-rw-r--r--src/openvpnmsica/openvpnmsica.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/openvpnmsica/openvpnmsica.c b/src/openvpnmsica/openvpnmsica.c
index cfbda8d..ae9b007 100644
--- a/src/openvpnmsica/openvpnmsica.c
+++ b/src/openvpnmsica/openvpnmsica.c
@@ -285,9 +285,9 @@ FindTUNTAPAdapters(_In_ MSIHANDLE hInstall)
OPENVPNMSICA_SAVE_MSI_SESSION(hInstall);
- /* Get all TUN/TAP network adapters. */
+ /* Get existing network adapters. */
struct tap_adapter_node *pAdapterList = NULL;
- uiResult = tap_list_adapters(NULL, NULL, &pAdapterList, FALSE);
+ uiResult = tap_list_adapters(NULL, NULL, &pAdapterList);
if (uiResult != ERROR_SUCCESS)
{
goto cleanup_CoInitialize;
@@ -573,9 +573,9 @@ schedule_adapter_create(
_In_z_ LPCTSTR szHardwareId,
_Inout_ int *iTicks)
{
- /* Get all available network adapters. */
+ /* Get existing network adapters. */
struct tap_adapter_node *pAdapterList = NULL;
- DWORD dwResult = tap_list_adapters(NULL, NULL, &pAdapterList, TRUE);
+ DWORD dwResult = tap_list_adapters(NULL, NULL, &pAdapterList);
if (dwResult != ERROR_SUCCESS)
{
return dwResult;
@@ -674,9 +674,9 @@ schedule_adapter_delete(
_In_z_ LPCTSTR szHardwareId,
_Inout_ int *iTicks)
{
- /* Get available adapters with given hardware ID. */
+ /* Get adapters with given hardware ID. */
struct tap_adapter_node *pAdapterList = NULL;
- DWORD dwResult = tap_list_adapters(NULL, szHardwareId, &pAdapterList, FALSE);
+ DWORD dwResult = tap_list_adapters(NULL, szHardwareId, &pAdapterList);
if (dwResult != ERROR_SUCCESS)
{
return dwResult;
@@ -1125,9 +1125,9 @@ ProcessDeferredAction(_In_ MSIHANDLE hInstall)
}
}
- /* Get all available adapters. */
+ /* Get existing adapters. */
struct tap_adapter_node *pAdapterList = NULL;
- dwResult = tap_list_adapters(NULL, NULL, &pAdapterList, TRUE);
+ dwResult = tap_list_adapters(NULL, NULL, &pAdapterList);
if (dwResult == ERROR_SUCCESS)
{
/* Does the adapter exist? */