From patchwork Thu Nov 21 18:07:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "stipa (Code Review)" X-Patchwork-Id: 3952 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:1b0d:b0:5db:37e7:e801 with SMTP id cv13csp501282mab; Thu, 21 Nov 2024 10:08:13 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXWi/OU2NNM1PzLKi0z9SRr1lR4XofgZEjvSxMqsSQSdavxpw18IG8dwdfspFJ+eoFSjmSj/XeMgmY=@openvpn.net X-Google-Smtp-Source: AGHT+IHRTGna/jZWBO77pdy19ZucUiQ5Fv3qYTFxB4cfQ6mymPYzQuEqg3zGjl8KW2cSmRd6pipb X-Received: by 2002:a05:6870:9619:b0:296:b0d8:9025 with SMTP id 586e51a60fabf-296d9bcedd8mr8353488fac.20.1732212493078; Thu, 21 Nov 2024 10:08:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732212493; cv=none; d=google.com; s=arc-20240605; b=bsSbcGvZmkFlXDTPd983yOoZX1DPUuhxOfxJhvhRP1/aFqCXO4NIJ/PiOGm+OllJe9 NPDqG+Hg4H8kfwXWLn6Ja4NAOtTOaJhGVTL8dfP92EobMeV6ehqT8k07BXaSPWQghqo5 mhCSdnfdEPOPIbuIq/qeHcdGGQEuptIl6jAUOh6cNfu82zE+5EWnn4RfelrzFwb3B9WD lwpa9Fd7lsr0gIWTjIaKlew1KRk0EScRiKhGnCm+wvN9eZP/j0BAvgf43ipfpM9QahmA /+syyN+e7JeDBbhtU2KHUEDEvDSlmQyHxll05ba02sOxyyUuJEYvcPGalW7HSygEROkV aPOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:cc:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:user-agent :mime-version:message-id:references:auto-submitted:to:date:from :dkim-signature:dkim-signature:dkim-signature; bh=8ljZ/raYQ0H7TCwIKxBY5KPKSWN44oOWZ6YFRZzsWtw=; fh=U7wEyxtwz2o5+UdevFSA47vNeG9knhWH0KV//QhD5a0=; b=N1TtGEP7ch/8xIh+R2YBcyTJ6gz9hFxft7/SUZ7/gkBRo5ZDodW6yQy+CK38sCLMah sy9aJCZg8fqCI3xXpsvWzNtHp+SYHmx5UldRGpyC7syHsm6n3kKwlyenZsRoy8pLZ74B sR/WhBvrK28ZR3gMcja1PTBPmXpOIFdH7xs21KpWrjpKdIC2yha9utAxW+/zzGK+4Qw6 pRa4sQPkvhqKwdn4+UwwECRL4HrqGIMhsDtEy7yqXa+B6AndnxHmoUVaBdOu0t+/uAHv VreGhZNI1u30vmU8zUtDNX9HZY2I43x5+1iAVu0zMDUtwTygenmFpzxsSIgS1jQddbsM ObpA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="SXjCF/2m"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=mHFI4D2F; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=Y6hkaQLB; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=openvpn.net; dara=fail header.i=@openvpn.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 586e51a60fabf-2971d5d2074si85439fac.113.2024.11.21.10.08.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Nov 2024 10:08:13 -0800 (PST) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="SXjCF/2m"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=mHFI4D2F; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=Y6hkaQLB; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=openvpn.net; dara=fail header.i=@openvpn.net Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1tEBb3-0006wh-26; Thu, 21 Nov 2024 18:08:05 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1tEBb1-0006wZ-Ml for openvpn-devel@lists.sourceforge.net; Thu, 21 Nov 2024 18:08:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Content-Transfer-Encoding:MIME-Version :Message-ID:Reply-To:References:Subject:List-Unsubscribe:List-Id:Cc:To:Date: From:Sender:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help: List-Subscribe:List-Post:List-Owner:List-Archive; bh=X87N7UTHNJG3DkxosbHqZufsrXNin6PNUo+8fVf93fQ=; b=SXjCF/2ms0GJNbMw8lkwFTbbX6 jvYcy2lhZoBwB1HRrdGebXSYjdLpFt3lYR0QeRHz/hY8KVHC96jH5lLbluc4cOvsC9GbDp9k71aln qBxU9udFL3gkEbST3W7Nl6LrVQhSRXhhtvdXW11i3gGDmI5PSZRcKrHO1eOz3mk4NqxM=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Reply-To: References:Subject:List-Unsubscribe:List-Id:Cc:To:Date:From:Sender:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help:List-Subscribe:List-Post: List-Owner:List-Archive; bh=X87N7UTHNJG3DkxosbHqZufsrXNin6PNUo+8fVf93fQ=; b=m HFI4D2Fs0eJ4F5WGQpx9hdAy4tnI6MSIJUjTOkfchk4RhOM7K5ZT+ynKQC6ZPLENtSmj4EcDvch5C 7YGiIBy3fpCnkRHFi1xLQr3UqPVqNDN0rlgz+sCLckmnsfsgAmVnsV67g86BldR/hSOrVh30W7l/b OkIbUNvdo/wpMGGM=; Received: from mail-wm1-f43.google.com ([209.85.128.43]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1tEBb1-0004Sj-I7 for openvpn-devel@lists.sourceforge.net; Thu, 21 Nov 2024 18:08:04 +0000 Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4315abed18aso10268365e9.2 for ; Thu, 21 Nov 2024 10:08:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvpn.net; s=google; t=1732212476; x=1732817276; darn=lists.sourceforge.net; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from:from:to:cc :subject:date:message-id:reply-to; bh=X87N7UTHNJG3DkxosbHqZufsrXNin6PNUo+8fVf93fQ=; b=Y6hkaQLBfX1LhIi7QUBYkjswQP5wZqIx0Khug4bYh/nP6YWl5rnhHZe656lFqqfLA3 ls1qUYnkPu+XCR6Sgl2vQN9CQddGjcu5DJz4RIO2AOpJGDnED3/+ABPH04xU7H9C06oh UMbEJaFfFTFVroG6TTai8BVvabUyMgETIJbDwTBrGBwnB0dGnt/kPmS/aOJ80xGI9v6Y zby4jI1k/19bpE8XGVrilBDG4ErBaVMwaCMX9cBtdVJKAF6N+YxmP1SX336HHgvj6hjx kUwzznsbjzKHSoOscLfSSwErPtv7gm1cM8SzRtC466uDFKGCySPYcf44FxdOUpFVXoif ODOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732212476; x=1732817276; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=X87N7UTHNJG3DkxosbHqZufsrXNin6PNUo+8fVf93fQ=; b=wgK1zkIA5/puJCzN7OYsYG5HDGtXSSqfWOtTXgVhtEy8bbg0CvzEVctatYu11bldku 2sQVuWFzmWSCk0qwR9N1zHNYm3GieG3hLsznpa6cvuxDaGV6jKeRPeN/FPQJOlk9H241 MI7LdGR1D7g+z+BUCqESR2imoEukSUcJDPfj5ED+40M61f2IzcQAKQY1x2gmZScvN0sX EQZ8LrMQdBar99fGJ0b/5WtaU+yhbG+zRQchqJJva1JhJTE1un0RpDPPZN5yoz/Ruw9i DgCuGg+1zTLkO6W2bSJowlh3+xOHAEcaTW4ebWR2qJ09fCZFDvKoCdW+0pTJeWIaopd+ 3BBw== X-Gm-Message-State: AOJu0YzWULcGRAb4AZZug35kXb4TZjWEfiWyut8kHV0/hg5xwEgewvMk 7V4x025Cf7cSH0U9fkgh0kcRLZaHXRE+cNdM9ah/R6q/x50rjJVZEPXkW95KdKBYpl3oqGvK6Ol G X-Gm-Gg: ASbGncuVUCsjrglLyOTMOK8WworQFQNmAhxbwAFzlOaqj4WoQj2xT1irlPUHiOf/Adb gIfQjguiex9dNW7TI1RA8qqbEf74klHeQoABCCXZftI2n/ifmESQMLFapM3nwR4BrqbRSJ4u4tt Gn3wuf4zPBqDNezAeyi+0TB6xvpM+tUpjRq3ASTPeUlIevw9oijLyMnXzPe3NlzqD96guX894vp de+aDhfa+JNK6NmyM1tZUeTlJWeQpfA+mHtEFwPd3qhC2IQDYRlMdnr6bZKI+3IEvWdwza7iDWN RLBN1zBtaBhp31gtq9dUrfTB5NOPkH8gL3GrTtJkAQ== X-Received: by 2002:a05:600c:4712:b0:426:64a2:5362 with SMTP id 5b1f17b1804b1-433489b4777mr66614905e9.8.1732212476202; Thu, 21 Nov 2024 10:07:56 -0800 (PST) Received: from gerrit.openvpn.in (ec2-18-159-0-78.eu-central-1.compute.amazonaws.com. [18.159.0.78]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fbc42b3sm184918f8f.68.2024.11.21.10.07.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Nov 2024 10:07:55 -0800 (PST) From: "stipa (Code Review)" X-Google-Original-From: "stipa (Code Review)" X-Gerrit-PatchSet: 1 Date: Thu, 21 Nov 2024 18:07:55 +0000 To: plaisthos , flichtenheld Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange X-Gerrit-Change-Id: I145573555aaace5e94774b5f977d032d3747ed72 X-Gerrit-Change-Number: 814 X-Gerrit-Project: openvpn X-Gerrit-ChangeURL: X-Gerrit-Commit: 52c62f1af3a272dfc396a99c315ce98b93f576b6 References: Message-ID: <241103e957af68f399f7e150e8f6c8674c67d951-HTML@gerrit.openvpn.net> MIME-Version: 1.0 User-Agent: Gerrit/3.8.2 X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-1.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Attention is currently required from: flichtenheld, plaisthos. Hello plaisthos, flichtenheld, I'd like you to do a code review. Please visit Content analysis details: (-0.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.43 listed in list.dnswl.org] 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [209.85.128.43 listed in sa-accredit.habeas.com] 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [209.85.128.43 listed in bl.score.senderscore.com] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.43 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 WEIRD_PORT URI: Uses non-standard port number for HTTP 0.0 HTML_MESSAGE BODY: HTML included in message -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 T_KAM_HTML_FONT_INVALID Test for Invalidly Named or Formatted Colors in HTML X-Headers-End: 1tEBb1-0004Sj-I7 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: mudp.c: keep offset value when reset buffer X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: lstipakov@gmail.com, arne-openvpn@rfc2549.org, openvpn-devel@lists.sourceforge.net, frank@lichtenheld.com Cc: openvpn-devel Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1816356447072668707?= X-GMAIL-MSGID: =?utf-8?q?1816356447072668707?= X-getmail-filter-classifier: gerrit message type newchange Attention is currently required from: flichtenheld, plaisthos. Hello plaisthos, flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/814?usp=email to review the following change. Change subject: mudp.c: keep offset value when reset buffer ...................................................................... mudp.c: keep offset value when reset 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/1 diff --git a/src/openvpn/mudp.c b/src/openvpn/mudp.c index 5fbd7b0..d8e3d69 100644 --- a/src/openvpn/mudp.c +++ b/src/openvpn/mudp.c @@ -54,7 +54,9 @@ struct context *c = &m->top; - buf_reset_len(&c->c2.buffers->aux_buf); + /* dco-win server requres prepend with sockaddr, so preserve offset */ + buf_init(&c->c2.buffers->aux_buf, buf.offset); + buf_copy(&c->c2.buffers->aux_buf, &buf); m->hmac_reply = c->c2.buffers->aux_buf; m->hmac_reply_dest = &m->top.c2.from;