From patchwork Sat Nov 22 18:52:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4621 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:6c3:b0:7b1:439f:bdf with SMTP id j3csp979840maw; Sat, 22 Nov 2025 10:53:01 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXyQRVG4V9R/I4FOUvWqvK64rITbVQfO5jg/xKQk8NZahlp4S0fpxrQ7MyAZ/+HItated1XjGVGSPY=@openvpn.net X-Google-Smtp-Source: AGHT+IF8Cri0pzemp/d4GbN38I3zeKlMPdzqEonE942ltgNIih2n0PewCTvLSgDdRYjGwEvncXAM X-Received: by 2002:a05:6830:4189:b0:7c7:55e3:9117 with SMTP id 46e09a7af769-7c79906bd0bmr3026397a34.22.1763837581693; Sat, 22 Nov 2025 10:53:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1763837581; cv=none; d=google.com; s=arc-20240605; b=Ut1Yq2rckMgu353Wb61gEZrLT85xpGWTlSyA8by9LQODl3rr9kyEB1qIRbEGBwUkyy wHFRhdc45BOgYJtzszkWK9jcQceRlLRym5cFQ6rc1GJO26Qm5qWoWJI/v3t54R3k5BYz AaTmZmxiEWgPKox6vCqU5rH5dAWxdDQ0veBVH+kaqmY2N5bGJbNc7/plKWHyr5UngvgM pEnHNXEq4eDQc0RS57m2iPvTMlMlRcxlPy5mhYCqqxSZh4a/G0wwDHea8RFDDChb1LnR 3JaaS9eahgsPiSs5IQubBRsYzU5Z8UZS4KL6OMGg/CYNbDsxWODb8sTlCm9FI5p6h0Ip NuuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature:dkim-signature; bh=9cnYLHJg/s6e3Dv6Yp7XaljlMVL7oj85oLCGFVcubtQ=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=d7GEGzcrZgBrJiZQ7tLyghjs+0PW2fbUhe28WXPiN+eau1dSyakQ7uSq13NjYdTZdw tZj4ieymO/NaE9hJxP0h3N7U84qRPLbuKFCI/h4E3wFu2ibrJvxHBM7bFBk84gOYgS0W FNcTRHF03MdSg9Ubg8sHJLGP0JUKCxg2b8lfpJHSmIhFknhVqH0fz3ozZ1/+GkIn6vuu sx/Qak/dP1+Yw9xOgIFz4pyQReyJdvX+dfXCFKaXbzlZIgMZ/XtNzgLmVpx1zKThS+HH je2QMZTz/DtD8wBDEOfaVYiS8zitNeHFBIt8zIkv62OTfatRq2NHM9iEgRurmAfd7Cbf cX5A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=AZktEsiy; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="fTWKDh2/"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=faCvPWXf; 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=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 46e09a7af769-7c78d41fa0csi1810830a34.443.2025.11.22.10.53.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 22 Nov 2025 10:53:01 -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=pass header.i=@lists.sourceforge.net header.s=beta header.b=AZktEsiy; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="fTWKDh2/"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=faCvPWXf; 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=muc.de DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:MIME-Version:References:In-Reply-To:Message-ID:Date:To:From:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=9cnYLHJg/s6e3Dv6Yp7XaljlMVL7oj85oLCGFVcubtQ=; b=AZktEsiyMp3r3qFyxgAexf8e6v D6pMDefDwXc5pc8BEBCp9V5ZGv8KazhCxG114OiJLC/rn1WkjEvNo7QnMOSbHMPrgQNR69itlSwNN rnq0A9UMBWkVwm70KALvOSpqbZ89+uXx25PqUXSEGtfWq81M6leyyv2vjPWuJNsxiK+Q=; 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 1vMsjC-0005nG-US; Sat, 22 Nov 2025 18:52:58 +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 1vMsjB-0005mh-RK for openvpn-devel@lists.sourceforge.net; Sat, 22 Nov 2025 18:52:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=4nNjs0En1XDAN17N2CS62EnD8hY+kLe7QD7POALFnck=; b=fTWKDh2/o/ws330d1tzHpfh+X2 QvvMZ7EF4mfG8cJVlr5DkgvqzzDJ+wXL/I5kSTmuljWUIQfAxnNesx9FJPHv6Ikt/AcAotjbxJfqN De8rGYigq1CvA7TUzh5GgBSHdykdxzObl18Hm4EBYMExUQgRzHoJu/hKE8AnmNDz8S4M=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=4nNjs0En1XDAN17N2CS62EnD8hY+kLe7QD7POALFnck=; b=faCvPWXfZIpT8fc+o/qX87IznB e5egDopkl61i5QwLEjVs6GxLwWkGGpMtCLHPbrMGM961Yq0QcWqumPgUSv3jhofSTxGf9U47wJzUj YDuqRWdLkNXRAUalHiD7VxufJgzlfwZTYHwLdNAyGcDhmwX/nWPkewnb1brkfyXH0pD0=; Received: from [193.149.48.134] (helo=blue.greenie.muc.de) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1vMsj0-00049I-9R for openvpn-devel@lists.sourceforge.net; Sat, 22 Nov 2025 18:52:47 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.18.1/8.18.1) with ESMTP id 5AMIqdZi026331 for ; Sat, 22 Nov 2025 19:52:39 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.1/8.18.1/Submit) id 5AMIqdZd026329 for openvpn-devel@lists.sourceforge.net; Sat, 22 Nov 2025 19:52:39 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Sat, 22 Nov 2025 19:52:33 +0100 Message-ID: <20251122185239.26312-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.49.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "sfi-spamd-1.hosts.colo.sdot.me", 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: From: Gianmarco De Gregori Removed the event_ctl() for ENABLE_ASYNC_PUSH in io_wait_dowork() since that function is not executed by servers anymore. Removed a duplicated code in multi_io_process_io() for new incoming TCP connections since the same thing is done couple lines above. Content analysis details: (1.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URI: openvpn.net] 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1vMsj0-00049I-9R Subject: [Openvpn-devel] [PATCH v1] multi-socket: remove duplicated/dead code 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: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1849517756131048133?= X-GMAIL-MSGID: =?utf-8?q?1849517756131048133?= From: Gianmarco De Gregori Removed the event_ctl() for ENABLE_ASYNC_PUSH in io_wait_dowork() since that function is not executed by servers anymore. Removed a duplicated code in multi_io_process_io() for new incoming TCP connections since the same thing is done couple lines above. Change-Id: Id1457f8432b4f0a69108b91ca12f2cbd0818f90d Signed-off-by: Gianmarco De Gregori Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1384 --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1384 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c index d57cbe0..ccb8404 100644 --- a/src/openvpn/forward.c +++ b/src/openvpn/forward.c @@ -2214,9 +2214,7 @@ static uintptr_t management_shift = MANAGEMENT_SHIFT; /* depends on MANAGEMENT_READ and MANAGEMENT_WRITE */ #endif -#ifdef ENABLE_ASYNC_PUSH - static uintptr_t file_shift = FILE_SHIFT; -#endif + #if defined(TARGET_LINUX) || defined(TARGET_FREEBSD) static uintptr_t dco_shift = DCO_SHIFT; /* Event from DCO linux kernel module */ #endif @@ -2242,14 +2240,6 @@ } #endif -#ifdef ENABLE_ASYNC_PUSH - /* arm inotify watcher */ - if (c->options.mode == MODE_SERVER) - { - event_ctl(c->c2.event_set, c->c2.inotify_fd, EVENT_READ, (void *)file_shift); - } -#endif - /* * Possible scenarios: * (1) tcp/udp port has data available to read diff --git a/src/openvpn/multi_io.c b/src/openvpn/multi_io.c index 6e31687..fe72456 100644 --- a/src/openvpn/multi_io.c +++ b/src/openvpn/multi_io.c @@ -500,18 +500,7 @@ multi_io_action(m, NULL, TA_TUN_READ, false); } } - /* new incoming TCP client attempting to connect? */ - else if (e->arg == MULTI_IO_SOCKET) - { - struct multi_instance *mi; - ASSERT(m->top.c2.link_sockets[0]); - socket_reset_listen_persistent(m->top.c2.link_sockets[0]); - mi = multi_create_instance_tcp(m, m->top.c2.link_sockets[0]); - if (mi) - { - multi_io_action(m, mi, TA_INITIAL, false); - } - } + #if defined(ENABLE_DCO) /* incoming data on DCO? */ else if (e->arg == MULTI_IO_DCO)