From: "stipa (Code Review)" Date: Mon, 27 Jan 2025 09:58:05 +0000 In-Reply-To: References: Reply-To: lstipakov@...277..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <1e9e21850c5d52150ec11cabad5aa32eed6ef294-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="ZPs4Y1/xZss="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: mudp.c: keep offset value when resetting buffer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: openvpn-devel --ZPs4Y1/xZss= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: plaisthos, stipa. Hello flichtenheld, plaisthos, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/814?usp=3Demail to look at the new patch set (#11). The change is no longer submittable: checks~ChecksSubmitRule is unsatisfied= now. Change subject: mudp.c: keep offset value when resetting buffer ...................................................................... mudp.c: keep offset value when resetting buffer dco-win requires control packets to be prepended with sockaddr. For that, an offset value in buffer must be kept. Doing it always doesn't harm and makes code cleaner compared to adding "if (dco_win_server)" condition. Change-Id: I145573555aaace5e94774b5f977d032d3747ed72 Signed-off-by: Lev Stipakov --- M src/openvpn/mudp.c 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/14/814/11 diff --git a/src/openvpn/mudp.c b/src/openvpn/mudp.c index 4f2bbd7..5f43db9 100644 --- a/src/openvpn/mudp.c +++ b/src/openvpn/mudp.c @@ -54,7 +54,9 @@ struct context *c =3D &m->top; - buf_reset_len(&c->c2.buffers->aux_buf); + /* dco-win server requires prepend with sockaddr, so preserve offset */ + ASSERT(buf_init(&c->c2.buffers->aux_buf, buf.offset)); + buf_copy(&c->c2.buffers->aux_buf, &buf); m->hmac_reply =3D c->c2.buffers->aux_buf; m->hmac_reply_dest =3D &m->top.c2.from; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/814?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I145573555aaace5e94774b5f977d032d3747ed72 Gerrit-Change-Number: 814 Gerrit-PatchSet: 11 Gerrit-Owner: stipa Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: stipa Gerrit-MessageType: newpatchset --ZPs4Y1/xZss= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: plaisthos, stipa.

stipa uploaded patch set #11 to this change.

View Change

The change is no longer submittable: checks~ChecksSubmitRule is un= satisfied now.

mudp.c: keep offset value when resetting buffer

dco-w= in requires control packets to be prepended
with sockaddr. For that, an = offset value in buffer
must be kept. Doing it always doesn't harm an= d makes
code cleaner compared to adding "if (dco_win_server)"<= br>condition.

Change-Id: I145573555aaace5e94774b5f977d032d3747ed72Signed-off-by: Lev Stipakov <lev@...515...>
---
M src/openvpn= /mudp.c
1 file changed, 3 insertions(+), 1 deletion(-)

git pul= l ssh://gerrit.openvpn.net:29418/openvpn refs/changes/14/814/11
dif=
f --git a/src/openvpn/mudp.c b/src/openvpn/mudp.c
index 4f2= bbd7..5f43db9 100644
--- a/src/openvpn/mudp.c
+++ b/src/openvpn/mudp.c
@@ -54,7 +54,9 @@

struct context *c =3D &m->top;
<= span>
- buf_reset_l= en(&c->c2.buffers->aux_buf);
+ /* dco-win server requires prepend with sockaddr, so= preserve offset */
+= ASSERT(buf_init(&c->c2.buffers->aux_buf, buf.offset));=
+
buf_= copy(&c->c2.buffers->aux_buf, &buf);
m-&= gt;hmac_reply =3D c->c2.buffers->aux_buf;
m->= hmac_reply_dest =3D &m->top.c2.from;

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

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I145573555aaace5e94774b5f977= d032d3747ed72
Gerrit-Change-Number: 814
Gerrit-PatchSet: 11
Gerrit-Owner: stipa <lstipakov@...277...>= ;
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: stipa <lstipakov@...1663...= .>
Gerrit-MessageType: newpatchset
--ZPs4Y1/xZss=--