[Openvpn-devel] openvpnmsica: remove adapter renaming

Message ID 20200902123938.188-1-lstipakov@gmail.com
State Rejected
Headers show
Series [Openvpn-devel] openvpnmsica: remove adapter renaming | expand

Commit Message

Lev Stipakov Sept. 2, 2020, 2:39 a.m. UTC
From: Lev Stipakov <lev@openvpn.net>

Renaming doesn't work on some machines (https://github.com/OpenVPN/openvpn-build/issues/187)
and we couldn't find the cause. Also others do not seem to do it, so let's get rid of it.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
---
 src/openvpnmsica/openvpnmsica.c | 9 ---------
 1 file changed, 9 deletions(-)

Comments

Selva Nair Sept. 2, 2020, 3:11 a.m. UTC | #1
Hi,

I would suggest to keep this renaming but make it not fatal. A
descriptive name is nice to have and we could even make the name
configurable at some point in future.

Selva

On Wed, Sep 2, 2020 at 8:40 AM Lev Stipakov <lstipakov@gmail.com> wrote:

> From: Lev Stipakov <lev@openvpn.net>
>
> Renaming doesn't work on some machines (
> https://github.com/OpenVPN/openvpn-build/issues/187)
> and we couldn't find the cause. Also others do not seem to do it, so let's
> get rid of it.
>
> Signed-off-by: Lev Stipakov <lev@openvpn.net>
> ---
>  src/openvpnmsica/openvpnmsica.c | 9 ---------
>  1 file changed, 9 deletions(-)
>
> diff --git a/src/openvpnmsica/openvpnmsica.c
> b/src/openvpnmsica/openvpnmsica.c
> index 31e90bd2..10d4a1cc 100644
> --- a/src/openvpnmsica/openvpnmsica.c
> +++ b/src/openvpnmsica/openvpnmsica.c
> @@ -1094,15 +1094,6 @@ ProcessDeferredAction(_In_ MSIHANDLE hInstall)
>
>              GUID guidAdapter;
>              dwResult = tap_create_adapter(NULL, NULL, szHardwareId,
> &bRebootRequired, &guidAdapter);
> -            if (dwResult == ERROR_SUCCESS)
> -            {
> -                /* Set adapter name. */
> -                dwResult = tap_set_adapter_name(&guidAdapter, szName);
> -                if (dwResult != ERROR_SUCCESS)
> -                {
> -                    tap_delete_adapter(NULL, &guidAdapter,
> &bRebootRequired);
> -                }
> -            }
>          }
>          else if (wcsncmp(szArg[i], L"deleteN=", 8) == 0)
>          {
> --
> 2.17.1
>
>
>
> _______________________________________________
> Openvpn-devel mailing list
> Openvpn-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openvpn-devel
>
<div dir="ltr">Hi,<div><br><div>I would suggest to keep this renaming but make it not fatal. A descriptive name is nice to have and we could even make the name configurable at some point in future. </div></div><div><br></div><div>Selva</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 2, 2020 at 8:40 AM Lev Stipakov &lt;<a href="mailto:lstipakov@gmail.com">lstipakov@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">From: Lev Stipakov &lt;<a href="mailto:lev@openvpn.net" target="_blank">lev@openvpn.net</a>&gt;<br>
<br>
Renaming doesn&#39;t work on some machines (<a href="https://github.com/OpenVPN/openvpn-build/issues/187" rel="noreferrer" target="_blank">https://github.com/OpenVPN/openvpn-build/issues/187</a>)<br>
and we couldn&#39;t find the cause. Also others do not seem to do it, so let&#39;s get rid of it.<br>
<br>
Signed-off-by: Lev Stipakov &lt;<a href="mailto:lev@openvpn.net" target="_blank">lev@openvpn.net</a>&gt;<br>
---<br>
 src/openvpnmsica/openvpnmsica.c | 9 ---------<br>
 1 file changed, 9 deletions(-)<br>
<br>
diff --git a/src/openvpnmsica/openvpnmsica.c b/src/openvpnmsica/openvpnmsica.c<br>
index 31e90bd2..10d4a1cc 100644<br>
--- a/src/openvpnmsica/openvpnmsica.c<br>
+++ b/src/openvpnmsica/openvpnmsica.c<br>
@@ -1094,15 +1094,6 @@ ProcessDeferredAction(_In_ MSIHANDLE hInstall)<br>
<br>
             GUID guidAdapter;<br>
             dwResult = tap_create_adapter(NULL, NULL, szHardwareId, &amp;bRebootRequired, &amp;guidAdapter);<br>
-            if (dwResult == ERROR_SUCCESS)<br>
-            {<br>
-                /* Set adapter name. */<br>
-                dwResult = tap_set_adapter_name(&amp;guidAdapter, szName);<br>
-                if (dwResult != ERROR_SUCCESS)<br>
-                {<br>
-                    tap_delete_adapter(NULL, &amp;guidAdapter, &amp;bRebootRequired);<br>
-                }<br>
-            }<br>
         }<br>
         else if (wcsncmp(szArg[i], L&quot;deleteN=&quot;, 8) == 0)<br>
         {<br>
-- <br>
2.17.1<br>
<br>
<br>
<br>
_______________________________________________<br>
Openvpn-devel mailing list<br>
<a href="mailto:Openvpn-devel@lists.sourceforge.net" target="_blank">Openvpn-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/openvpn-devel" rel="noreferrer" target="_blank">https://lists.sourceforge.net/lists/listinfo/openvpn-devel</a><br>
</blockquote></div>
Kristof Provost via Openvpn-devel Sept. 2, 2020, 4:32 a.m. UTC | #2
Hi,

Adapter name already is configurable in openvpn-build/windows-msi/msi.wxs: https://github.com/Amebis/openvpn-build/blob/5f5ba807de2bad50d01a5b08dfc6fad98ee41213/windows-msi/msi.wxs#L1300

Regards, Simon

From: Selva Nair <selva.nair@gmail.com>

Sent: Wednesday, September 2, 2020 3:12 PM
To: Lev Stipakov <lstipakov@gmail.com>
Cc: Lev Stipakov <lev@openvpn.net>; openvpn-devel <openvpn-devel@lists.sourceforge.net>
Subject: Re: [Openvpn-devel] [PATCH] openvpnmsica: remove adapter renaming

Hi,

I would suggest to keep this renaming but make it not fatal. A descriptive name is nice to have and we could even make the name configurable at some point in future.

Selva
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Consolas;
	panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
span.EmailStyle19
	{mso-style-type:personal-reply;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri",sans-serif;
	mso-fareast-language:EN-US;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="SL" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Adapter name
<i>already is</i> configurable in openvpn-build/windows-msi/msi.wxs: <a href="https://github.com/Amebis/openvpn-build/blob/5f5ba807de2bad50d01a5b08dfc6fad98ee41213/windows-msi/msi.wxs#L1300">
https://github.com/Amebis/openvpn-build/blob/5f5ba807de2bad50d01a5b08dfc6fad98ee41213/windows-msi/msi.wxs#L1300</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Regards, Simon<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-GB">From:</span></b><span lang="EN-GB"> Selva Nair &lt;selva.nair@gmail.com&gt;
<br>
<b>Sent:</b> Wednesday, September 2, 2020 3:12 PM<br>
<b>To:</b> Lev Stipakov &lt;lstipakov@gmail.com&gt;<br>
<b>Cc:</b> Lev Stipakov &lt;lev@openvpn.net&gt;; openvpn-devel &lt;openvpn-devel@lists.sourceforge.net&gt;<br>
<b>Subject:</b> Re: [Openvpn-devel] [PATCH] openvpnmsica: remove adapter renaming<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-GB"><o:p>&nbsp;</o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-GB">Hi,<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-GB"><o:p>&nbsp;</o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-GB">I would suggest to keep this renaming but make it not fatal. A descriptive&nbsp;name is nice to have and we could even make the name configurable at some point in future.&nbsp;<o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"><o:p>&nbsp;</o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB">Selva<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</body>
</html>

Patch

diff --git a/src/openvpnmsica/openvpnmsica.c b/src/openvpnmsica/openvpnmsica.c
index 31e90bd2..10d4a1cc 100644
--- a/src/openvpnmsica/openvpnmsica.c
+++ b/src/openvpnmsica/openvpnmsica.c
@@ -1094,15 +1094,6 @@  ProcessDeferredAction(_In_ MSIHANDLE hInstall)
 
             GUID guidAdapter;
             dwResult = tap_create_adapter(NULL, NULL, szHardwareId, &bRebootRequired, &guidAdapter);
-            if (dwResult == ERROR_SUCCESS)
-            {
-                /* Set adapter name. */
-                dwResult = tap_set_adapter_name(&guidAdapter, szName);
-                if (dwResult != ERROR_SUCCESS)
-                {
-                    tap_delete_adapter(NULL, &guidAdapter, &bRebootRequired);
-                }
-            }
         }
         else if (wcsncmp(szArg[i], L"deleteN=", 8) == 0)
         {