From patchwork Thu Sep 12 09:07:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "plaisthos (Code Review)" X-Patchwork-Id: 3827 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:24eb:b0:5b9:581e:f939 with SMTP id o11csp651725man; Thu, 12 Sep 2024 02:07:33 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV1R3JzqWFoQfELGxzJuMTg2ebdUO/o/OFk/E1FyOldMfRvs3I38/cRhONAXhaE8R7IroNIGw2lmA8=@openvpn.net X-Google-Smtp-Source: AGHT+IEJfAMIiX208tFRGRv+gFIBx8foCKFaU0BPclxuVUcpk0YC/P9wecQFyGv5zuITbFg766by X-Received: by 2002:a05:6602:140f:b0:82a:2a0b:1c7d with SMTP id ca18e2360f4ac-82d1f8cbb72mr254106639f.5.1726132053281; Thu, 12 Sep 2024 02:07:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726132053; cv=none; d=google.com; s=arc-20240605; b=WVgvSq9Rz98d/x0P2FWIl4oXDHY0oNf/Qf7Ypk/laVhcMCjDEMx5xYBVECNbZTAoYv ycVDrlmXrm+w63F4rh8V6sbYpovIGjlZ8kGmjMYepaSn6wUs4J4hAGmU32X+ii3eBPTI K0Cixa1IFusk7Tj9dh3cuXLVG6beRdGPLqeYZfPcOLPsbBM6QV/s1W5swq2ls20rE12g q+marGtBvfsYQ3kCwzj/+llGPYjv7zmcIASh/rdsY3QTTx0L2V74dx61QpLTl0HI+ZXs lhayCKBnj/K4D6XGwiSxZvbNeRazX+e/OSJFKX3cudfUdwyDrN7I7+6MHBZVm1/FYjx5 g2PA== 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=3s2GsHATJrmFIt6CInDZDqnsJ4BVnO8AGTwRDCBRQiQ=; fh=U7wEyxtwz2o5+UdevFSA47vNeG9knhWH0KV//QhD5a0=; b=YR9QitRZhRYU8dl2piIBj7zvsZBAOm14Dt6TecivhaEVq45d2EbkmuNTXrFt3wr6gC 4sjX67WoKuIAhM7EECuRocWEYcxsXRAR8pVu7qzsyuzzP1YtJJrAGQNaWmVEBgf2IJdp Oeq7AJ/UvwBYYeEP7aM0yqYCHd4uojXfkUotfK3ohtAbnrDMxsbTJ9Xlg3epgKZQhGcI nx24eraTq5ZCGl8SlGVGAp7FnYNvlNMDgZ55HADYLj5KfWXCRwxe0yQ2nXkVprIZhY2y JiAPSyLYlVD6b6AMso0w9czcqbc5osg9i1IrWXCS0iwrqiq1elbSaVCHCRw5mLsdc+/p 0t3w==; 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=BYRTC82j; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=WHyqaYIG; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b="hHu/uqLl"; 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 ca18e2360f4ac-82aa733cd19si534547439f.9.2024.09.12.02.07.32 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Sep 2024 02:07:33 -0700 (PDT) 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=BYRTC82j; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=WHyqaYIG; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b="hHu/uqLl"; 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-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1sofnS-00078E-5S; Thu, 12 Sep 2024 09:07:25 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1sofnR-000788-7l for openvpn-devel@lists.sourceforge.net; Thu, 12 Sep 2024 09:07:24 +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=g6H3Npychy1vMDx1MBHeXY5YJkKXijuY0qH77PtNWBo=; b=BYRTC82j0yTMNCj1voZ9dMr/Qb YaqBDZ6BtFCOfybGfZtkAiuEMlayabVgG1dseMDfLN87UDLK2nI81KEBnJemT+aw13M1KMl/ZQXW0 QAUskDuhlbC+VGTtRC9HebWOcn0X+miPfzv6izWkT3EeGMGKOQWWELdsi4ZtjblVvPhg=; 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=g6H3Npychy1vMDx1MBHeXY5YJkKXijuY0qH77PtNWBo=; b=W HyqaYIG6ZW6D38IyNTK/9B9dVuWWnnYGP4qxkRjno1ZmyVGqkugFNt6Z9lnn/BEBbtYBf8dOooYKp xx2x8wqyYSKDdzWp6yMSOJuxFp/kXHz4YnIzau6t8UC4C8oRoW0zxJRVvNH3/jRqqnPn8IHEHcEpV iYLXfdrsdds5Ou/Q=; Received: from mail-wr1-f42.google.com ([209.85.221.42]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1sofnP-00089V-Ji for openvpn-devel@lists.sourceforge.net; Thu, 12 Sep 2024 09:07:24 +0000 Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-374bfc395a5so380748f8f.0 for ; Thu, 12 Sep 2024 02:07:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvpn.net; s=google; t=1726132032; x=1726736832; 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=g6H3Npychy1vMDx1MBHeXY5YJkKXijuY0qH77PtNWBo=; b=hHu/uqLlod0ueQKe/FfpQ5qhN+zp39hXBIqt0qx84k0bwgltz4aV40w6oRpCO8SqC0 jce/E/u4SomXxxV+09yJ4czLbclmHo6EV0bpIGsuswAPWNeB08etWWEltG0jBy+BeNqp UPqiEMUKsVRlnTigQHetsu7yLkQHDjan0d5iRU24VzptoxKUzrV2X5Sr90areqWUZL2u 6o29GUXRM5ZjsjMBUE52kdEQFRITAhPuMEuPaRTpdD7GLpjwm7I/QLQbz/W6i/rCVKVs Md8cU61WpaSPXlfzatsbWWvDJK3oUjPMjtgSiesC/OYaHErPJAHYZT3yWFTRaKGvIWHP 3nJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726132032; x=1726736832; 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=g6H3Npychy1vMDx1MBHeXY5YJkKXijuY0qH77PtNWBo=; b=DUCwQ7pLhR8dQmVhxiVj6vtciQiMo7+2fo5F/wMXYst19YoyBv1kqcbq0cVG5A+/de 2W8lcVgQfRkN5ZQ5hUpwy7FIhO2n8LFwGjavVYM3SjGjiR8iqVYyp8/PfWwrVfs9Bpwp wtiu6yqVBPvdep5USxl5/kOTyVM3sIB2DjeEK62vo/rcXeRcyShzxERsjv4a0dBL0ori gHHk8uOsF9zDAJy6Nx5swuKQv8/yYmADyqOVVSiJXHXA8p9YgKFpww7Y8kq5sIC5CN0M 1JkYRuoZKEFE/b3cHWBRlu0579zewYKvEqmIMliceB90ub3LYScjztFGV7ATTNA1lE1l SJ6Q== X-Gm-Message-State: AOJu0YxbG+Kghk+dzDP0xuZo9x1TvSqjerzRnaM4n1Wnzp66nTKRyUX8 zp2CVyPI++WSwZWKjLz+OOMuRwOmKMvwRlm8T4+/S8VnoE8U5N0W38e8pFfwHRR2CQIFvDlF5lV y X-Received: by 2002:adf:fb46:0:b0:371:6fc7:d45d with SMTP id ffacd0b85a97d-378c27a14damr1077431f8f.2.1726132031152; Thu, 12 Sep 2024 02:07:11 -0700 (PDT) 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-378956d372dsm13781697f8f.73.2024.09.12.02.07.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Sep 2024 02:07:10 -0700 (PDT) From: "ordex (Code Review)" X-Google-Original-From: "ordex (Code Review)" X-Gerrit-PatchSet: 1 Date: Thu, 12 Sep 2024 09:07:10 +0000 To: plaisthos , flichtenheld Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange X-Gerrit-Change-Id: Ife50e37cd49d55ec81a70319a524ffeaf0625a56 X-Gerrit-Change-Number: 744 X-Gerrit-Project: openvpn X-Gerrit-ChangeURL: X-Gerrit-Commit: f8c820b9984846e8a6aa951ca282fc1b327194e2 References: Message-ID: <82520948128aa2fddaca26f83a8d4ec9e630bb8b-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-2.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.221.42 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.221.42 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_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.0 T_KAM_HTML_FONT_INVALID Test for Invalidly Named or Formatted Colors in HTML X-Headers-End: 1sofnP-00089V-Ji Subject: [Openvpn-devel] [XS] Change in openvpn[master]: dco: mark peer as deleted from kernel after receiving CMD_DEL_PEER no... 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: a@unstable.cc, 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?1809980643954019976?= X-GMAIL-MSGID: =?utf-8?q?1809980643954019976?= 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/+/744?usp=email to review the following change. Change subject: dco: mark peer as deleted from kernel after receiving CMD_DEL_PEER notification ...................................................................... dco: mark peer as deleted from kernel after receiving CMD_DEL_PEER notification some extra DCO calls may be made after receiving the DEL_PEER notification (i.e. due to timeout), but this will result in an error message due to the peer having disappeared already. An extra call might be, for example, an explicit DEL_PEER in the attempt of cleaning the peer state. For this reason, inform userspace that there is no peer in kernel anymore and prevent errors which may result confusing. Change-Id: Ife50e37cd49d55ec81a70319a524ffeaf0625a56 Signed-off-by: Antonio Quartulli --- M src/openvpn/forward.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/44/744/1 diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c index 40b7cc4..374ba47 100644 --- a/src/openvpn/forward.c +++ b/src/openvpn/forward.c @@ -1256,6 +1256,8 @@ switch (dco->dco_message_type) { case OVPN_CMD_DEL_PEER: + /* peer is gone, unset ID to prevent more kernel calls */ + c->c2.tls_multi->dco_peer_id = -1; if (dco->dco_del_peer_reason == OVPN_DEL_PEER_REASON_EXPIRED) { msg(D_DCO_DEBUG, "%s: received peer expired notification of for peer-id "