From: "cron2 (Code Review)" Date: Wed, 26 Nov 2025 11:11:17 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., heiko@...515..., openvpn-devel@lists.sourceforge.net Message-ID: <1242d0a84e7b8d90901d94adbcb5545b88ddee75-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="DNWE2ZbPxmw="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: iservice: handle ignoring itf domains correctly List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: d12fk Cc: plaisthos , openvpn-devel --DNWE2ZbPxmw= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/13= 94?usp=3Demail ) Change subject: iservice: handle ignoring itf domains correctly ...................................................................... iservice: handle ignoring itf domains correctly GetItfDnsDomains() does ignore domains, which are in the search domains list. Handling of this was done wrong if there was more than one interface domain. In any case the size returned to the caller was calculated wrong. Reported-by: Marc Heuse Reported-by: stephan@...2953... Change-Id: I02e2c7b27b5a39b11556e4753c648baa05344ffc Signed-off-by: Heiko Hund Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1394 Message-Id: <20251126104706.5378-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg34= 677.html Signed-off-by: Gert Doering --- M src/openvpnserv/interactive.c 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c index 4a3e689..ce37ac2f 100644 --- a/src/openvpnserv/interactive.c +++ b/src/openvpnserv/interactive.c @@ -2190,14 +2190,16 @@ { if (comma) { - pos =3D comma + 1; + /* Overwrite the ignored domain with remaining one= (s) */ + memmove(pos, comma + 1, buf_size - converted_size); + *size -=3D domain_size + one_glyph; continue; } else { /* This was the last domain */ *pos =3D '\0'; - *size +=3D one_glyph; + *size -=3D domain_size; return wcslen(domains) ? NO_ERROR : ERROR_FILE_NOT= _FOUND; } } -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1394?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: I02e2c7b27b5a39b11556e4753c648baa05344ffc Gerrit-Change-Number: 1394 Gerrit-PatchSet: 4 Gerrit-Owner: d12fk Gerrit-Reviewer: cron2 Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel --DNWE2ZbPxmw= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 sub= mitted this change.

View Change

iservice: handle ignoring itf domains correctly<=
br>
GetItfDnsDomains() does ignore domains, which are in the search doma= ins
list. Handling of this was done wrong if there was more than one
= interface domain. In any case the size returned to the caller was
calcul= ated wrong.

Reported-by: Marc Heuse <marc@...2953...>
Repor= ted-by: stephan@...2953...
Change-Id: I02e2c7b27b5a39b11556e4753c648baa0= 5344ffc
Signed-off-by: Heiko Hund <heiko@...2662...>
Acked-by: = Gert Doering <gert@...1296...>
Gerrit URL: https://gerrit.openvpn.= net/c/openvpn/+/1394
Message-Id: <20251126104706.5378-1-gert@...1725...= ..>
URL: https://www.mail-archive.com/openvpn-devel@...282...= .net/msg34677.html
Signed-off-by: Gert Doering <gert@...1296...>---
M src/openvpnserv/interactive.c
1 file changed, 4 insertions(+)= , 2 deletions(-)

diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive=
.c
index 4a3e689..ce37ac2f 100644
--- a/src= /openvpnserv/interactive.c
+++ b/src/openvpnserv/interactiv= e.c
@@ -2190,14 +2190,16 @@
= {
if (comma)
= {
- = pos =3D comma + 1;
+ /* Overwrite the ignored domain wi= th remaining one(s) */
+ = *size -=3D domain_size + one_glyph;
= continue;
}
= else
{
= /* This was the last domain */
*pos =3D '\0';
- *size +=3D one_glyph;<= /span>
+ = *size -=3D domain_size;
return= wcslen(domains) ? NO_ERROR : ERROR_FILE_NOT_FOUND;
= }
}
<= br>

To view, visit change 1394. To unsubscribe, or for help writing mai= l filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I02e2c7b27b5a39b11556e4753c6= 48baa05344ffc
Gerrit-Change-Number: 1394
Gerrit-PatchSet: 4
Gerrit-Owner: d12fk <heiko@...515...>
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
= --DNWE2ZbPxmw=--