From patchwork Wed May 7 12:44:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 4242 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:e147:b0:656:592e:a137 with SMTP id nw7csp3547780mab; Wed, 7 May 2025 05:45:20 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW3BPFo5issWE1SAZem/92jy+acNV3f6qHggT7wWM6yT7xbJj9hgIlRpxseAdBpSjlx013E3kGLdNk=@openvpn.net X-Google-Smtp-Source: AGHT+IEnkQc+Lx1jAt0F1nNWsuKH8HqdAEzppZ+mjPhLllCinlTriZCCQr364vJuAe4ueu7DTjE5 X-Received: by 2002:a05:6871:788:b0:29e:2bbd:51ba with SMTP id 586e51a60fabf-2db5be36857mr1920982fac.9.1746621920463; Wed, 07 May 2025 05:45:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746621920; cv=none; d=google.com; s=arc-20240605; b=VWfDy8ETbU39OlvUyuP/dBxFU3HUj8LRuBFApeJuzIaT3nBXZvoZHsTpBbOzJdpcJA qg7wpyD8stZgyZT9AzqLb7wAFyt0+9POvWO0vnVZXKteLfmkEgox9Lsp1gsCxmu95iaX HEkriw5N2yXkJWspOaRqgFhyHW9fk6jETsVOK21eVEPBbFf2+go6DEOsXDdu1YE6/dAC RcnCLhWsYPhDLTQyT3J3F54d1tAU7JiDwqAE1j6ry3F/EnFAWduKYVDVa7oMLc25WVf5 N/1hWzjRwGRsyscyAmNp9T/9AytKQY3s1Cs2V/35fj5BCaqZT07JVc2CozuWodM5sS9/ RGpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:content-transfer-encoding:cc:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:dkim-signature :dkim-signature:dkim-signature; bh=Hz/E5TCmuH55mCv2uWs8E12pR3lgMXC3uJEhj6qqWk8=; fh=BEXsVF2vhWxaMgs2qFKAWZUkW8vXXdGeO1y9DIa+eNM=; b=SwobiaqkXOqGZCWYSMpXxY9v4GlK7d7WoW7QdFsDLfj93tlscvI+8lvEwzEQMPn0tK LpmRbTvJZBhJ6WU9A0AxfBg5QGf5zgIrQBixrD+BFKlnuupr1xEUpvOIQMFN7SNU5c87 rHyB7ypCQpWBFqxS1YbJp0/APY6E03DfjUJAIF+se8n3Ciddbxf76JGO043i9GCFzIdW tjCuqgtOhipiINWkQLhs4RNNX9Y8rQK8CbtyW8ocfOA6E+cKn1vP8aIX1fgQHvM8Fx8V NbZEiADNI6BjRD6wiOjo6U+y30o6Mf2YWc5+GOCnw5cb89ujRcy2YMilCJ5cbi1Ums7y 1Fsg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=GeVyrJBw; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=Tbxa6Rbf; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=T55sElzx; dkim=neutral (body hash did not verify) header.i=@unstable.cc header.s=20220809-q8oc header.b=EBa1zn+d; 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 Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 586e51a60fabf-2db5cc15a61si1063275fac.66.2025.05.07.05.45.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 May 2025 05:45:20 -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=GeVyrJBw; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=Tbxa6Rbf; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=T55sElzx; dkim=neutral (body hash did not verify) header.i=@unstable.cc header.s=20220809-q8oc header.b=EBa1zn+d; 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 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:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:MIME-Version:Message-ID:Date:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=Hz/E5TCmuH55mCv2uWs8E12pR3lgMXC3uJEhj6qqWk8=; b=GeVyrJBwMT1P/iBi5vOG5N3oT2 gRIAZYJdeq1gS88VKIcTvCBcrCrJEYlvnrK5GObxDQuzrJB0YSP4F/1eDb4UJSiS49/YEpmaYg3cr m42fGMoenZGp3LbrjGn7vKH8D78GKbN0msmwj1rwRC6NBUHNIGz6DyCKRmLjSrwH1laQ=; 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 1uCe9E-0003Am-Ss; Wed, 07 May 2025 12:45:16 +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 1uCe9D-0003Ab-Qq for openvpn-devel@lists.sourceforge.net; Wed, 07 May 2025 12:45:15 +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:Message-ID: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=uoZmt7xDn0EhYyEBVvkBLct8yTmdNJs3DznTE2K5Q0g=; b=Tbxa6RbfOIYGja6ygcaR20a79p 7TqipoBUw9sBmDasGX9Qw+SZwXwL9dpCa1mBNSheR400C5xHreTMAYaSUXXGjLm3rc0tps1AO+IZw K3jlQyIJKykLQyr710VYS5sYKhv6KwtgcpIkP/EZSJPh4o3So+J1R5aQ+DOInITY7k4A=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:Cc:To:From :Sender:Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=uoZmt7xDn0EhYyEBVvkBLct8yTmdNJs3DznTE2K5Q0g=; b=T 55sElzxFGSEVjFvLS3qAMt+umolY0vRkWcnke+JEBbEkQ4ein72/M4My4Ms8a3wKkIPUBmevymqqF nc+Pf4hMNwMWV83IaBLCH314b/RAoQf6Cv5z1Shv/+AY24nKDlJn+zG4J0EnD7IhAgYrluDN4PpCD rHexL5rJjxHn9oiE=; Received: from wilbur.contactoffice.com ([212.3.242.68]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1uCe8w-00064m-L0 for openvpn-devel@lists.sourceforge.net; Wed, 07 May 2025 12:45:15 +0000 Received: from smtpauth2.co-bxl (smtpauth2.co-bxl [10.2.0.24]) by wilbur.contactoffice.com (Postfix) with ESMTP id 1EBB42552; Wed, 7 May 2025 14:44:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1746621887; s=20220809-q8oc; d=unstable.cc; i=a@unstable.cc; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Transfer-Encoding; bh=uoZmt7xDn0EhYyEBVvkBLct8yTmdNJs3DznTE2K5Q0g=; b=EBa1zn+dXOanNI42HniYY2Q+FAN30YNcjVD/6Ta4+MK69zJTbXSAIi2FRaj4FSUY JB1Ady2ouXY99r2tmu9OUJITBiFpj+HGsaTrI51tB0TEnYKts2XA/B+27K9SmFB2o0G dYXDj/usR16EZ+G58xAJlEKm+8IjpMvHcFpARun3DOslJBq0UggXIvUYqc8xsoZqOlh dZhEDT/rh2xi3IqywgbSBSo0SvJYjWzGfzJL5ZEDYdILBlj6wZKJbQ7/OLbVzVxPGY3 J+T1rCwJBDfWdxRMEr6maPYbPf2hqTpaWSZGkIxS62VBLzeU5hAgmXN1fbGdq5t9j02 vKAP8285WA== Received: by smtp.mailfence.com with ESMTPSA ; Wed, 7 May 2025 14:44:45 +0200 (CEST) From: Antonio Quartulli To: openvpn-devel@lists.sourceforge.net Date: Wed, 7 May 2025 14:44:39 +0200 Message-ID: <20250507124439.28161-1-a@unstable.cc> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 X-ContactOffice-Account: com:375058688 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: From: Antonio Quartulli ndo_start_xmit is basically expected to always return NETDEV_TX_OK. However, in case of error, it was currently returning NET_XMIT_DROP, which is not a valid netdev_tx_t return value, leading to misin [...] Content analysis details: (-0.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [212.3.242.68 listed in sa-accredit.habeas.com] 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: unstable.cc] 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. [212.3.242.68 listed in bl.score.senderscore.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-Headers-End: 1uCe8w-00064m-L0 Subject: [Openvpn-devel] [PATCH ovpn-net-next] ovpn: fix ndo_start_xmit return value on error 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: , Cc: Antonio Quartulli , sd@queasysnail.net Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1831465826972011435?= X-GMAIL-MSGID: =?utf-8?q?1831465826972011435?= From: Antonio Quartulli ndo_start_xmit is basically expected to always return NETDEV_TX_OK. However, in case of error, it was currently returning NET_XMIT_DROP, which is not a valid netdev_tx_t return value, leading to misinterpretation. Change ndo_start_xmit to always return NETDEV_TX_OK to signal back to the caller that the packet was handled (even if dropped). Effects of this bug can be seen when sending IPv6 packets having no peer to forward them to: $ ip netns exec ovpn-server oping -c20 fd00:abcd:220:201::1 PING fd00:abcd:220:201::1 (fd00:abcd:220:201::1) 56 bytes of data.00:abcd:220:201 :1 ping_send failed: No buffer space available ping_sendto: No buffer space available ping_send failed: No buffer space available ping_sendto: No buffer space available ... Fixes: c2d950c4672a ("ovpn: add basic interface creation/destruction/management routines") Signed-off-by: Antonio Quartulli Acked-By: Gert Doering Tested-By: Gert Doering Acked-By: Gert Doering --- drivers/net/ovpn/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ovpn/io.c b/drivers/net/ovpn/io.c index dd8a8055d967..03728ce733a9 100644 --- a/drivers/net/ovpn/io.c +++ b/drivers/net/ovpn/io.c @@ -408,7 +408,7 @@ netdev_tx_t ovpn_net_xmit(struct sk_buff *skb, struct net_device *dev) dev_dstats_tx_dropped(ovpn->dev); skb_tx_error(skb); kfree_skb_list(skb); - return NET_XMIT_DROP; + return NETDEV_TX_OK; } /**