From patchwork Mon Mar 20 19:58:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 3142 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:2310:b0:9f:bfa4:120f with SMTP id r16csp1883735dye; Mon, 20 Mar 2023 13:00:00 -0700 (PDT) X-Google-Smtp-Source: AK7set96PtwTtBMCq50cwQfeMxe97X6L/9r7xodXn+QgqqmLne4pHEb+zE23DZMy+Bwlm1unM0BE X-Received: by 2002:a17:903:283:b0:19a:e96a:58b3 with SMTP id j3-20020a170903028300b0019ae96a58b3mr22885901plr.22.1679342400748; Mon, 20 Mar 2023 13:00:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679342400; cv=none; d=google.com; s=arc-20160816; b=sJEaZglRKRZgAVe1+8DPzxX/uYV2drsIdTGFvIik7VJZasU0w7vR1fdO+9kADP3Exj 83U8Ov790Av64UXCfo/sOz7A0ezQtiiU6SQKUptR8+moe6Ql+jQSPapyFqfaJANxiGO+ wShV0IN1LusQfz1rVObLyrjvfnlKZgtVTMve+qqqnIuxIiRfoCoZNXx469W8aTXxqepY w+k9AKFaWTPp0e47xSSMvmQd1qO6dYEh1H1ZqwiumMH/nKu0scTnOA+1+P+ZGoFIbOqO aXjzgXJn9pePRG7PVAMBVi/08UP7ObxjG1cT8lpnCYkucr+bApGUv2FDN86somcsJdrw K/qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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; bh=mFYi51iXpb2UcgnN6WcLZ99HOqbdzI8OM9GnhFPAsxo=; b=YSij7xNEOFZBLaVkAIu5NrFRfStTmidsNg2mkZ54evBfJmtkt2BiG5XBldCCZOdBUG 2wrJRfjohgVsy55IuKiahbBmthrgQRn2un0kFdKuzgSJuc6qKaW4u6v7VYMjLeNIOLPh ZUeJTlyaC2Z5kmVKUJkGGulyDdtpG6y90/gfQbxscYZiJliE/tNQVxlKDr/gOxW+UR36 34uJtuYD2rDAOb8FdoAknYclFuo3RuFBWGukw/IJceUDD+JMK9Fg5uOHKmxpZC9AQzuz 0EzKR6YTv0t8ThDP/j7fONj5TKnI3UBJyotQ8QJRJB/ELUGnDVayI8Mf5ajslsNh9cWx +TFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=Xp7F13dA; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=iEH7EvpL; dkim=fail header.i=@unstable.cc header.s=20220809-q8oc header.b=NHvUYdUp; 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 jk6-20020a170903330600b001a1a0db7f5bsi11040299plb.335.2023.03.20.13.00.00 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Mar 2023 13:00:00 -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=Xp7F13dA; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=iEH7EvpL; dkim=fail header.i=@unstable.cc header.s=20220809-q8oc header.b=NHvUYdUp; 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 [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 1peLes-0000pK-3y; Mon, 20 Mar 2023 19:59:06 +0000 Received: from [172.30.20.202] (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 1peLej-0000oz-0F for openvpn-devel@lists.sourceforge.net; Mon, 20 Mar 2023 19:58: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: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=BKejOfx00VqO07/jBVxtOlJiuDo1YYQNlNd2SbiK6WE=; b=Xp7F13dAGv+EhIBQgznoOslA2G XWctsBG3qrmPMvhF/qCynmuVMgU1O1010/MWSHlng3Dy0T7GOZ0cSEfSK/fx/lAaSYtcdCXy6omF8 ejuo9LNWltrypHw2Gzxcsl3sBckqwJgUqk9afxKadxpoT16R1XfflrBuwMXfrtqK0Cdo=; 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=BKejOfx00VqO07/jBVxtOlJiuDo1YYQNlNd2SbiK6WE=; b=i EH7EvpLlKkd4qxpK4OAOL6co/VMtPaz7Fw64LWzfZT0yRBCl22EUlfyftdMYsW85bUHvThbqikQJF /Fw3p0fLPMoaJ8fH+WXydp2zL97fQKdQtDSxO0QGUIWKik6WF50oQOt6PnyND44M959CGYIC784PK SEopmyFeemzXIY/Q=; Received: from wilbur.contactoffice.com ([212.3.242.68]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1peLeZ-00EXpq-S5 for openvpn-devel@lists.sourceforge.net; Mon, 20 Mar 2023 19:58:54 +0000 Received: from smtpauth2.co-bxl (smtpauth2.co-bxl [10.2.0.24]) by wilbur.contactoffice.com (Postfix) with ESMTP id D8A93A85; Mon, 20 Mar 2023 20:58:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1679342320; s=20220809-q8oc; d=unstable.cc; i=a@unstable.cc; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Transfer-Encoding; l=1101; bh=BKejOfx00VqO07/jBVxtOlJiuDo1YYQNlNd2SbiK6WE=; b=NHvUYdUp7lk1kOSUI1IGnTD/Tp147UyPDvia1GYd5M2tPkvl8gwUpjOFGRjeaUSG sidG6pWrkReDiRiAwihX7o7Mk3NI3i1T2VZOzuerynGCebRdwV3qxLWyvD4RVosFd2N ZAoH33VyKyzkIeqL4l44sVFYCvMOJ3g8PeikKoPdPRDbalQbkzgBA5YlE8QT0qcH39V eRSUCSvuO32zojKpQq38zvXxhbRn8PYlxbXDt+R/YYWLhoKBtpdo+Wowbk1xmcwg6sI sDWNDwMoAn20VCjvrasBGjTeWrYPdFM+I/b0/wu2qJ7DstMktj+ZLmdsAT2D5/oGBiE kVYF/AgSxg== Received: by smtp.mailfence.com with ESMTPSA ; Mon, 20 Mar 2023 20:58:37 +0100 (CET) From: Antonio Quartulli To: openvpn-devel@lists.sourceforge.net Date: Mon, 20 Mar 2023 20:58:20 +0100 Message-Id: <20230320195820.6675-1-a@unstable.cc> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Flag: NO X-Spam-Status: No, hits=-2.9 required=4.7 symbols=ALL_TRUSTED, BAYES_00 device=10.2.0.21 X-ContactOffice-Account: com:375058688 X-Spam-Score: -0.9 (/) 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: Netlink has its own error space and reports errors via the return value of its functions. For this reason remove the M_ERRNO flag when printing its errors. At the moment we get something like this: netlink reports error (-7): Invalid input data or parameter: Interrupted system call (errno=4) Content analysis details: (-0.9 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.3.242.68 listed in list.dnswl.org] -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_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 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-Headers-End: 1peLeZ-00EXpq-S5 Subject: [Openvpn-devel] [PATCH] dco-linux: remove M_ERRNO flag when printing netlink error message 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 Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1760918137430418620?= X-GMAIL-MSGID: =?utf-8?q?1760918137430418620?= Netlink has its own error space and reports errors via the return value of its functions. For this reason remove the M_ERRNO flag when printing its errors. At the moment we get something like this: netlink reports error (-7): Invalid input data or parameter: Interrupted system call (errno=4) where the errno=4 (and its human readable representation) is a leftover from the previous recv() interrupted by a signal and it is totally unrelated to this netlink failure. Signed-off-by: Antonio Quartulli Acked-by: Gert Doering --- src/openvpn/dco_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openvpn/dco_linux.c b/src/openvpn/dco_linux.c index 98b2aae3..0e479beb 100644 --- a/src/openvpn/dco_linux.c +++ b/src/openvpn/dco_linux.c @@ -154,7 +154,7 @@ ovpn_nl_recvmsgs(dco_context_t *dco, const char *prefix) default: if (ret) { - msg(M_NONFATAL|M_ERRNO, "%s: netlink reports error (%d): %s", prefix, ret, nl_geterror(-ret)); + msg(M_NONFATAL, "%s: netlink reports error (%d): %s", prefix, ret, nl_geterror(-ret)); } break; }