From: "mrbff (Code Review)" Date: Mon, 3 Nov 2025 10:34:01 +0000 References: Reply-To: marco@...2726..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <17ae18062d74cfdce04ffb5840d86db2bb1735ac-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="GYS65X6cXRc="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: PUSH_UPDATE server: update reporting_addr after ifconfig update List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: openvpn-devel --GYS65X6cXRc= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, plaisthos. Hello plaisthos, flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/1340?usp=3Demail to review the following change. Change subject: PUSH_UPDATE server: update reporting_addr after ifconfig up= date ...................................................................... PUSH_UPDATE server: update reporting_addr after ifconfig update Update mi->reporting_addr(_ipv6) for staus reporting purposes after sending a PUSH_UPDATE containing an ifconfig(-ipv6) option. Github: fixes OpenVPN/openvpn#889 Change-Id: Ie15977b44091445b9d1edebe885d92ec5cb5770a Signed-off-by: Marco Baffo --- M src/openvpn/multi.c 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/40/1340/1 diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index 261209d..2b944667 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -4346,6 +4346,7 @@ multi_unlearn_in_addr_t(m, mi, old_addr); mi->context.c2.push_ifconfig_defined =3D false; mi->context.c2.push_ifconfig_local =3D 0; + mi->reporting_addr =3D 0; } /* Function to unlearn previous ifconfig-ipv6 of a client in the server mu= lti_context after a PUSH_UPDATE */ @@ -4358,6 +4359,7 @@ multi_unlearn_in6_addr(m, mi, old_addr6); mi->context.c2.push_ifconfig_ipv6_defined =3D false; CLEAR(mi->context.c2.push_ifconfig_ipv6_local); + CLEAR(mi->reporting_addr_ipv6); } /** @@ -4389,6 +4391,8 @@ { mi->context.c2.push_ifconfig_defined =3D true; mi->context.c2.push_ifconfig_local =3D ntohl(new_addr.s_addr); + /* set our client's VPN endpoint for status reporting purposes= */ + mi->reporting_addr =3D mi->context.c2.push_ifconfig_local; } } @@ -4408,6 +4412,8 @@ { mi->context.c2.push_ifconfig_ipv6_defined =3D true; mi->context.c2.push_ifconfig_ipv6_local =3D new_addr6; + /* set our client's VPN endpoint for status reporting purposes= */ + mi->reporting_addr_ipv6 =3D mi->context.c2.push_ifconfig_ipv6_= local; } } } -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1340?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: Ie15977b44091445b9d1edebe885d92ec5cb5770a Gerrit-Change-Number: 1340 Gerrit-PatchSet: 1 Gerrit-Owner: mrbff Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld --GYS65X6cXRc= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: flichtenheld, plaisthos.

mrbff would like plaisthos and flichtenheld to review t= his change.

V= iew Change

PUSH_UPDATE server: update reporting_addr a=
fter ifconfig update

Update mi->reporting_addr(_ipv6) for staus r= eporting purposes
after sending a PUSH_UPDATE containing an ifconfig(-ip= v6) option.

Github: fixes OpenVPN/openvpn#889

Change-Id: Ie15= 977b44091445b9d1edebe885d92ec5cb5770a
Signed-off-by: Marco Baffo <mar= co@...2726...>
---
M src/openvpn/multi.c
1 file changed, 6 inse= rtions(+), 0 deletions(-)

git pull ssh://gerrit.=
openvpn.net:29418/openvpn refs/changes/40/1340/1
diff --git a/src/o=
penvpn/multi.c b/src/openvpn/multi.c
index 261209d..2b94466= 7 100644
--- a/src/openvpn/multi.c
+++ b/sr= c/openvpn/multi.c
@@ -4346,6 +4346,7 @@
= multi_unlearn_in_addr_t(m, mi, old_addr);
mi->con= text.c2.push_ifconfig_defined =3D false;
mi->contex= t.c2.push_ifconfig_local =3D 0;
+ mi->reporting_addr =3D 0;
}
<= span>
/* Function to unlearn previous ifconfig-ipv6 of a = client in the server multi_context after a PUSH_UPDATE */
@= @ -4358,6 +4359,7 @@
multi_unlearn_in6_addr(m, mi, old= _addr6);
mi->context.c2.push_ifconfig_ipv6_defined = =3D false;
CLEAR(mi->context.c2.push_ifconfig_ipv6_= local);
+ CLEAR(mi= ->reporting_addr_ipv6);
}

<= span> /**
@@ -4389,6 +4391,8 @@
{<= /span>
mi->context.c2.push_ifconfig_defined =3D tr= ue;
mi->context.c2.push_ifconfig_local =3D = ntohl(new_addr.s_addr);
+ /* set our client's VPN endpoint for status reporting p= urposes */
+ = mi->reporting_addr =3D mi->context.c2.push_ifconfig_local;<= br> }
}

@@ -4408,6 +4412,8 @@

{
= mi->context.c2.push_ifconfig_ipv6_defined =3D true;
mi->context.c2.push_ifconfig_ipv6_local =3D new_addr6;
+ /* set our = client's VPN endpoint for status reporting purposes */
+ mi->reporting_addr_ip= v6 =3D mi->context.c2.push_ifconfig_ipv6_local;
= }
}
}

To view, visit change 1340. To unsubscribe, or for help writing mail filt= ers, visit setti= ngs.

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ie15977b44091445b9d1edebe885= d92ec5cb5770a
Gerrit-Change-Number: 1340
Gerrit-PatchSet: 1
Gerrit-Owner: mrbff <marco@...2726...> <= /div>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
= --GYS65X6cXRc=--