From: "d12fk (Code Review)" Date: Sun, 23 Nov 2025 06:47:33 +0000 References: Reply-To: heiko@...515..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net Message-ID: <3dc66ac2faf7abaa3d5ea313d3f769ba8af4f9bc-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="eh2QMDKQuxU="; 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: plaisthos Cc: openvpn-devel --eh2QMDKQuxU= 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/+/1394?usp=3Demail to review the following change. 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 --- M src/openvpnserv/interactive.c 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/94/1394/1 diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c index 006f748..8916bea 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: newchange Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I02e2c7b27b5a39b11556e4753c648baa05344ffc Gerrit-Change-Number: 1394 Gerrit-PatchSet: 1 Gerrit-Owner: d12fk Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos --eh2QMDKQuxU= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: plaisthos.

d12fk would like plaisthos to review this change.

V= iew Change

iservice: handle ignoring itf domains corre=
ctly

GetItfDnsDomains() does ignore domains, which are in the search= domains
list. Handling of this was done wrong if there was more than on= e
interface domain. In any case the size returned to the caller was
c= alculated wrong.

Reported-by: Marc Heuse <marc@...2953...>
= Reported-by: stephan@...2953...
Change-Id: I02e2c7b27b5a39b11556e4753c64= 8baa05344ffc
Signed-off-by: Heiko Hund <heiko@...2662...>
---M src/openvpnserv/interactive.c
1 file changed, 4 insertions(+), 2 del= etions(-)

git pull ssh://gerrit.openvpn.net:2941=
8/openvpn refs/changes/94/1394/1
diff --git a/src/openvpnserv/inter=
active.c b/src/openvpnserv/interactive.c
index 006f748..891= 6bea 100644
--- a/src/openvpnserv/interactive.c
<= span>+++ b/src/openvpnserv/interactive.c
@@ -2190,14 +2190,= 16 @@
{
= if (comma)
{
- pos =3D comma + 1;<= /span>
+ = /* Overwrite the ignored domain with remaining one(s) */
+ memmove(po= s, comma + 1, buf_size - converted_size);

+ *size -=3D domain_size + one_= glyph;
continue;
= }
else
<= span> {
/* Thi= s was the last domain */
*pos =3D = '\0';
- = *size +=3D one_glyph;
+ *size -=3D domain_size; return wcslen(domains) ? NO_ERROR : ERROR_F= ILE_NOT_FOUND;
}
= }

To view, visit change 1394. T= o unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I02e2c7b27b5a39b11556e4753c6= 48baa05344ffc
Gerrit-Change-Number: 1394
Gerrit-PatchSet: 1
Gerrit-Owner: d12fk <heiko@...515...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
= --eh2QMDKQuxU=--