| Message ID | 20251126104706.5378-1-gert@greenie.muc.de |
|---|---|
| State | New |
| Headers | show |
| Series | [Openvpn-devel,v3] iservice: handle ignoring itf domains correctly | expand |
This looks reasonable (and was one of the things I wondered about in
reviewing the first 5 single-line patches near to it - "this cannot work
at all?"). BB says it compiles. We have no unit or other systematic tests
for this, which - quite obviously - needs to be fixed...
Your patch has been applied to the master branch.
commit c0cb510257ac48d69c39388024beb1e75bee1893
Author: Heiko Hund
Date: Wed Nov 26 11:47:01 2025 +0100
iservice: handle ignoring itf domains correctly
Signed-off-by: Heiko Hund <heiko@ist.eigentlich.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1394
Message-Id: <20251126104706.5378-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg34677.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
--
kind regards,
Gert Doering
diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c index 5fb7f2b..31a7ffa 100644 --- a/src/openvpnserv/interactive.c +++ b/src/openvpnserv/interactive.c @@ -2190,14 +2190,16 @@ { if (comma) { - pos = comma + 1; + /* Overwrite the ignored domain with remaining one(s) */ + memmove(pos, comma + 1, buf_size - converted_size); + *size -= domain_size + one_glyph; continue; } else { /* This was the last domain */ *pos = '\0'; - *size += one_glyph; + *size -= domain_size; return wcslen(domains) ? NO_ERROR : ERROR_FILE_NOT_FOUND; } }