From: "cron2 (Code Review)" Date: Tue, 4 Nov 2025 09:11:25 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., marco@...2726..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <8b2433e01105018c2d1d4c81ffb8eca1ef3b8154-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="fBPZHDAC7i4="; 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: mrbff Cc: plaisthos , flichtenheld , openvpn-devel --fBPZHDAC7i4= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/13= 40?usp=3Demail ) 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 status 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 Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1340 Message-Id: <20251104085553.8218-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg34= 186.html Signed-off-by: Gert Doering --- M src/openvpn/multi.c 1 file changed, 6 insertions(+), 0 deletions(-) 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: merged Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ie15977b44091445b9d1edebe885d92ec5cb5770a Gerrit-Change-Number: 1340 Gerrit-PatchSet: 3 Gerrit-Owner: mrbff Gerrit-Reviewer: cron2 Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel --fBPZHDAC7i4= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 sub= mitted this change.

View Change

PUSH_UPDATE server: update reporting_addr after =
ifconfig update

Update mi->reporting_addr(_ipv6) for status repor= ting purposes
after sending a PUSH_UPDATE containing an ifconfig(-ipv6) = option.

Github: fixes OpenVPN/openvpn#889

Change-Id: Ie15977b= 44091445b9d1edebe885d92ec5cb5770a
Signed-off-by: Marco Baffo <marco@...220...= ..2726...>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1340Message-Id: <20251104085553.8218-1-gert@...1296...>
URL: https://= www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg34186.html
S= igned-off-by: Gert Doering <gert@...1296...>
---
M src/openvpn/= multi.c
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c
i= ndex 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 previo= us ifconfig-ipv6 of a client in the server multi_context after a PUSH_UPDAT= E */
@@ -4358,6 +4359,7 @@
multi_unlea= rn_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);
}<= br>
/**
@@ -4389,6 +4391,8 @@
{
mi->context.c2.push_i= fconfig_defined =3D true;
mi->context.c2.pu= sh_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_i= fconfig_local;
}
}
=
@@ -4408,6 +4412,8 @@
{
mi->context.c2.push_ifconfig_ipv6_defined =3D= true;
mi->context.c2.push_ifconfig_ipv6_lo= cal =3D new_addr6;
+ = /* set our client's VPN endpoint for status reporting purpos= es */
+ mi= ->reporting_addr_ipv6 =3D mi->context.c2.push_ifconfig_ipv6_local;
}
}
}

To view, visit change 1340. To unsubscribe, or for = help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ie15977b44091445b9d1edebe885= d92ec5cb5770a
Gerrit-Change-Number: 1340
Gerrit-PatchSet: 3
Gerrit-Owner: mrbff <marco@...2726...> <= /div>
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
= --fBPZHDAC7i4=--