[Openvpn-devel] [XS] Change in openvpn[master]: tun.c: set IPv4 address temporary on Windows

2025-12-10 Thread cron2 (Code Review)
cron2 has submitted this change. ( 
http://gerrit.openvpn.net/c/openvpn/+/1430?usp=email )

Change subject: tun.c: set IPv4 address temporary on Windows
..

tun.c: set IPv4 address temporary on Windows

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: fixes OpenVPN/openvpn#915

Change-Id: I07311f397e6cd278b90c33f024e927c282cd03e4
Signed-off-by: Lev Stipakov 
Acked-by: Gert Doering 
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1430
Message-Id: <[email protected]>
URL: 
https://www.mail-archive.com/[email protected]/msg34975.html
Signed-off-by: Gert Doering 
---
M src/openvpn/tun.c
1 file changed, 2 insertions(+), 2 deletions(-)




diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c
index 7236033..409cecb 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));


--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1430?usp=email
To unsubscribe, or for help writing mail filters, visit 
http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I07311f397e6cd278b90c33f024e927c282cd03e4
Gerrit-Change-Number: 1430
Gerrit-PatchSet: 2
Gerrit-Owner: stipa 
Gerrit-Reviewer: cron2 
Gerrit-Reviewer: plaisthos 
Gerrit-CC: openvpn-devel 
___
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel


[Openvpn-devel] [XS] Change in openvpn[master]: tun.c: set IPv4 address temporary on Windows

2025-12-10 Thread cron2 (Code Review)
cron2 has uploaded a new patch set (#2) to the change originally created by 
stipa. ( http://gerrit.openvpn.net/c/openvpn/+/1430?usp=email )

The following approvals got outdated and were removed:
Code-Review+2 by cron2


Change subject: tun.c: set IPv4 address temporary on Windows
..

tun.c: set IPv4 address temporary on Windows

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: fixes OpenVPN/openvpn#915

Change-Id: I07311f397e6cd278b90c33f024e927c282cd03e4
Signed-off-by: Lev Stipakov 
Acked-by: Gert Doering 
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1430
Message-Id: <[email protected]>
URL: 
https://www.mail-archive.com/[email protected]/msg34975.html
Signed-off-by: Gert Doering 
---
M src/openvpn/tun.c
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/30/1430/2

diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c
index 7236033..409cecb 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));


-- 
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1430?usp=email
To unsubscribe, or for help writing mail filters, visit 
http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I07311f397e6cd278b90c33f024e927c282cd03e4
Gerrit-Change-Number: 1430
Gerrit-PatchSet: 2
Gerrit-Owner: stipa 
Gerrit-Reviewer: cron2 
Gerrit-Reviewer: plaisthos 
Gerrit-CC: openvpn-devel 
___
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel


[Openvpn-devel] [XS] Change in openvpn[master]: tun.c: set IPv4 address temporary on Windows

2025-12-09 Thread cron2 (Code Review)
Attention is currently required from: plaisthos, stipa.

cron2 has posted comments on this change by stipa. ( 
http://gerrit.openvpn.net/c/openvpn/+/1430?usp=email )

Change subject: tun.c: set IPv4 address temporary on Windows
..


Patch Set 1: Code-Review+2


--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1430?usp=email
To unsubscribe, or for help writing mail filters, visit 
http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I07311f397e6cd278b90c33f024e927c282cd03e4
Gerrit-Change-Number: 1430
Gerrit-PatchSet: 1
Gerrit-Owner: stipa 
Gerrit-Reviewer: cron2 
Gerrit-Reviewer: plaisthos 
Gerrit-CC: openvpn-devel 
Gerrit-Attention: plaisthos 
Gerrit-Attention: stipa 
Gerrit-Comment-Date: Wed, 10 Dec 2025 07:58:44 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
___
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel


[Openvpn-devel] [XS] Change in openvpn[master]: tun.c: set IPv4 address temporary on Windows

2025-12-09 Thread stipa (Code Review)
Attention is currently required from: plaisthos.

Hello plaisthos,

I'd like you to do a code review.
Please visit

http://gerrit.openvpn.net/c/openvpn/+/1430?usp=email

to review the following change.


Change subject: tun.c: set IPv4 address temporary on Windows
..

tun.c: set IPv4 address temporary on Windows

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 
---
M src/openvpn/tun.c
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/30/1430/1

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));


--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1430?usp=email
To unsubscribe, or for help writing mail filters, visit 
http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I07311f397e6cd278b90c33f024e927c282cd03e4
Gerrit-Change-Number: 1430
Gerrit-PatchSet: 1
Gerrit-Owner: stipa 
Gerrit-Reviewer: plaisthos 
Gerrit-CC: openvpn-devel 
Gerrit-Attention: plaisthos 
___
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel