From: "stipa (Code Review)" Date: Wed, 10 Dec 2025 07:55:31 +0000 References: Reply-To: lstipakov@...277..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net Message-ID: <41986998bb42874286b39f0bc4146898b2c1d49b-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="ouTJd3K8xGo="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: tun.c: set IPv4 address temporary on Windows List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos Cc: openvpn-devel --ouTJd3K8xGo= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=3Demail 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=3Dactive 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=3Dactive. https://learn.microsoft.com/en-us/windows-server/administration/windows-com= mands/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=3Dactive */ + argv_printf(&argv, "%s%s interface ip set address %lu static %= s %s store=3Dactive", 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=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail 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 --ouTJd3K8xGo= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: plaisthos.

stipa would like plaisthos to review this change.

V= iew Change

tun.c: set IPv4 address temporary on Window=
s

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

https://learn.mic= rosoft.com/en-us/windows-server/administration/windows-commands/netsh-inter= face

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

Ch= ange-Id: I07311f397e6cd278b90c33f024e927c282cd03e4
Signed-off-by: Lev St= ipakov <lev@...515...>
---
M src/openvpn/tun.c
1 file change= d, 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, &= quot;%s%s interface ip set address %lu static %s %s", get_win_sys_path= (),
+ /* e= xample: netsh interface ip set address 42 static 10.3.0.1 255.255.255.0 sto= re=3Dactive */
+ = argv_printf(&argv, "%s%s interface ip set address %lu stati= c %s %s store=3Dactive", get_win_sys_path(),
= NETSH_PATH_SUFFIX, adapter_index, print_in_addr_t(ip, 0, &a= mp;gc),
print_in_addr_t(netmask, 0= , &gc));


To view,= visit c= hange 1430. To unsubscribe, or for help writing mail filters, visit settings.

<= meta itemprop=3D"name" content=3D"View Change"/>
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I07311f397e6cd278b90c33f024e= 927c282cd03e4
Gerrit-Change-Number: 1430
Gerrit-PatchSet: 1
Gerrit-Owner: stipa <lstipakov@...277...>= ;
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
= --ouTJd3K8xGo=--