From: Lev Stipakov <[email protected]>

Use store=active to set IPv4 address temporary so that
it will be removed on reboot. This makes the behavior
consistent with deletion and IPv6, where we already use
store=active.

https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/netsh-interface

GitHub: https://github.com/OpenVPN/openvpn/issues/915

Change-Id: I07311f397e6cd278b90c33f024e927c282cd03e4
Signed-off-by: Lev Stipakov <[email protected]>
Acked-by: Gert Doering <[email protected]>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1430
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1430
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Gert Doering <[email protected]>

        
diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c
index 0299285..849eddc 100644
--- a/src/openvpn/tun.c
+++ b/src/openvpn/tun.c
@@ -5119,8 +5119,8 @@
         }
         else
         {
-            /* example: netsh interface ip set address 42 static 10.3.0.1 
255.255.255.0 */
-            argv_printf(&argv, "%s%s interface ip set address %lu static %s 
%s", get_win_sys_path(),
+            /* example: netsh interface ip set address 42 static 10.3.0.1 
255.255.255.0 store=active */
+            argv_printf(&argv, "%s%s interface ip set address %lu static %s %s 
store=active", get_win_sys_path(),
                         NETSH_PATH_SUFFIX, adapter_index, print_in_addr_t(ip, 
0, &gc),
                         print_in_addr_t(netmask, 0, &gc));
 


_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to