From patchwork Fri May 23 07:38:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4264 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:a599:b0:662:a395:de2b with SMTP id hj25csp2213150mab; Fri, 23 May 2025 00:39:52 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXMPzVSbA15YVJfQ09x3/KVmBQ7c/nUk5ifYa+HKIZYGXFBHZp2Mb6658Exh7wm1oQF62faPcOyAdU=@openvpn.net X-Google-Smtp-Source: AGHT+IE3utpCZwLk8gp9meES5GC24aZXUFGY7rkMTTYdZpB/8pnCspBm+9bPhJWSLlLBpcHgzi16 X-Received: by 2002:a05:6808:83ae:b0:3f8:1df6:40f with SMTP id 5614622812f47-404da72460fmr12891766b6e.15.1747985948918; Fri, 23 May 2025 00:39:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747985948; cv=none; d=google.com; s=arc-20240605; b=I7bpRipKagn158kllve1kiypklIrHgrrO6cMKfsqXUyLZJLpCtrgBGDshR9dQpJJul REjXo9QevPRA4kmuLqyKlIWgzvjcfIkAFwnPiSYQNlOlEZXIAXVViTR0zee3ABCPTK/2 J0h0syIkctOafrxMkt3lmbYMv4XpZZfn1BsWbexgKrYo2e1R9DxMMBcG8adbGZU8GwrJ XtY6OkmGB8T3ZcB3qwk4s8VZd+RLFCnBjDFIC9S9G/zlBenhcGmfivnGfKfUI0LFLI5S z5ttqdyS0urTF6sb6xXvMSThyjMCF8RTK91n9zlzlokcw4Z8bMcspcjvhSkXZLoCv4gF E66g== 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=ObkjK6O7WIeNc674KAOzxzSB0i1oxkribU+K6/jhFXA=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=Vet9sLkasNhu8a9l3nw0qJ1ZibBWpzxwOq9uOXzzvr5r+5mjV8QXjs/HcGoicWByM/ JDnBEetx68gf9X5+S1UyUx65C8Xygcgfly2/MTFDi7iidwOqSuzlN/+Yd8My5l2dUwSb ncZzs3utkFBG5E4dIRP1me4Y/fkWhS7D/20rqFjC74fYoS8kFgHib9z16w7DGu8BzwIM MqHcWSoyAwGPFHKf88DEav8ArYHjQIg0PCqXpNWmcKnDf9f0/XsJWF3NqS2rmmcAdo5e kkWYO/wG4sGAmXmZiAfyD8r7kuHdW2Em0HZDyHNTM0nBunCsMMwR1QOgT32snBtlu4iP Na5w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=MkkDiU23; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=WVyx6JrW; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=jcVY3LH5; 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 5614622812f47-404d98f7e2dsi8988232b6e.207.2025.05.23.00.39.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 May 2025 00:39:08 -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=pass header.i=@lists.sourceforge.net header.s=beta header.b=MkkDiU23; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=WVyx6JrW; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=jcVY3LH5; 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=ObkjK6O7WIeNc674KAOzxzSB0i1oxkribU+K6/jhFXA=; b=MkkDiU23a8vqNxCje5C7gU7p8f H/aqK7r8ag/cagvZQNCNqDCzYtdzgtypa9LY2oXqo05nxQt8WCzssR1MI6Ma7+zjdY0iOLyYL181o jCLr/Ssuh+oSHrY8+XTbPiqaTGl59mzP4c3Z/s1Zk+jjbk1BzTCxOM+ygTPsqxn0PHis=; Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1uIMzh-00005B-9K; Fri, 23 May 2025 07:39:05 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1uIMzf-000053-Jl for openvpn-devel@lists.sourceforge.net; Fri, 23 May 2025 07:39:03 +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=9SXHShos5NWAHnLMlGtpgFb6mj5z0CJw4xQheYmgHyY=; b=WVyx6JrWPXqF09/FQaLIF/zyI3 jfW8ZcMeGGs9WT/Et14FrYrmbQQEt/5hQsGc6z59j3Rmbjermx0MnTW2YkpR4t81AuMzW2wyiglCB QDbpFDeVZ48OCSNALkLWh+yw6z0viSEdkCxjbx9eiJvavzV+gr5hOde2ytoHkrsolmF0=; 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=9SXHShos5NWAHnLMlGtpgFb6mj5z0CJw4xQheYmgHyY=; b=jcVY3LH5nQwt/bUfJagFLg8jsj oUg9GAwaAGM0lzGlOWGx11QvZv1JKKwC5J0Fqobosmzmx61VfH29zlelHV5NUdZivN/av1jTz5dcF M9EAXQQe6IQFXGjqmebus9/G7xbnBq2ROksTnBRZPI6OVpc4xGa5invs1+Br5jrmlvHk=; Received: from [193.149.48.143] (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 1uIMze-0004xi-CJ for openvpn-devel@lists.sourceforge.net; Fri, 23 May 2025 07:39:03 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.17.1.9/8.17.1.9) with ESMTP id 54N7coJU020881 for ; Fri, 23 May 2025 09:38:50 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.17.1.9/8.17.1.9/Submit) id 54N7coed020880 for openvpn-devel@lists.sourceforge.net; Fri, 23 May 2025 09:38:50 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Fri, 23 May 2025 09:38:41 +0200 Message-ID: <20250523073848.20848-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "6901ab67b84d", 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: Antonio Quartulli We may bail out parsing an incoming DCO message because it may concern a different interface. In that case we print the following debug messages: dco_do_read ovpn-dco: ignoring message (type=5) for foreign ifindex 313 process_incoming_dco: received message of type 0 - ignoring 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: 1uIMze-0004xi-CJ Subject: [Openvpn-devel] [PATCH v3] dco_linux: avoid bogus text when netlink message is not parsed 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?1832896114598792241?= X-GMAIL-MSGID: =?utf-8?q?1832896114598792241?= From: Antonio Quartulli We may bail out parsing an incoming DCO message because it may concern a different interface. In that case we print the following debug messages: dco_do_read ovpn-dco: ignoring message (type=5) for foreign ifindex 313 process_incoming_dco: received message of type 0 - ignoring However, the last message is confusing, because there is no message of type 0 being received, but the message_type was simply not initialized. Bail out parsing earlier and avoid printing any bogus text. Change-Id: I568faa12a5960e8b69de23c2df413b70b231592c Signed-off-by: Antonio Quartulli Acked-by: Gert Doering --- 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/+/1027 This mail reflects revision 3 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 ed4cdb4..7134f30 100644 --- a/src/openvpn/forward.c +++ b/src/openvpn/forward.c @@ -1251,6 +1251,12 @@ dco_do_read(dco); + /* no message for us to handle - platform specific code has logged details */ + if (dco->dco_message_type == 0) + { + return; + } + /* FreeBSD currently sends us removal notifcation with the old peer-id in * p2p mode with the ping timeout reason, so ignore that one to not shoot * ourselves in the foot and removing the just established session */