From patchwork Wed Sep 29 01:59:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 1975 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director8.mail.ord1d.rsapps.net ([172.31.255.6]) by backend30.mail.ord1d.rsapps.net with LMTP id OZxCO2FVVGGEZQAAIUCqbw (envelope-from ) for ; Wed, 29 Sep 2021 08:00:33 -0400 Received: from proxy11.mail.iad3b.rsapps.net ([172.31.255.6]) by director8.mail.ord1d.rsapps.net with LMTP id WD0/OmFVVGHfWAAAfY0hYg (envelope-from ) for ; Wed, 29 Sep 2021 08:00:33 -0400 Received: from smtp11.gate.iad3b ([172.31.255.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy11.mail.iad3b.rsapps.net with LMTPS id OH7dNGFVVGF2WwAARNREpw (envelope-from ) for ; Wed, 29 Sep 2021 08:00:33 -0400 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp11.gate.iad3b.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dmarc=none (p=nil; dis=none) header.from=unstable.cc X-Suspicious-Flag: YES X-Classification-ID: d8dec69c-211c-11ec-921f-52540070b5bb-1-1 Received: from [216.105.38.7] ([216.105.38.7:40784] helo=lists.sourceforge.net) by smtp11.gate.iad3b.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id F0/90-17907-16554516; Wed, 29 Sep 2021 08:00:33 -0400 Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1mVYEx-00022V-Jg; Wed, 29 Sep 2021 11:59:11 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVYEv-00022P-Or for openvpn-devel@lists.sourceforge.net; Wed, 29 Sep 2021 11:59:09 +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: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:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=LyYBWSKTBFPVsxXL4v/9hWC2ntBcHx9wP2v1IG6JaAY=; b=RkcqnNTV7Lfu/YQ8v6rcnj9B20 jMmGfkZ/9UlWTbrSboGOIX+Wm4+5HfmLaFTfLh03DS+u/+8VFACRU3nlFHI99YZ89MXMVTa9sc6NX Wqai20avSUR3FT4GrlYEsZHAYuu/7kxfv2VSr2yC/vL5TxeFMfEKcjYf93NreS3seus4=; 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: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:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=LyYBWSKTBFPVsxXL4v/9hWC2ntBcHx9wP2v1IG6JaAY=; b=dqoQXmXnEgKSgVMwMPf9wVhDg7 8C1Lm2fxWtg2A1Q96glLG4V4PnL+113E/TbMj27XEj1Qxl3qzLBOP0zBTX48fH1G2nvP4UIs5vvS0 WcbO67hrAqM5LCyfXrmibqivCealMDu5241w61kd9yyLQg1/xT5pcSACzt00guN6tljE=; Received: from s2.neomailbox.net ([5.148.176.60]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) id 1mVYEt-0000lD-QY for openvpn-devel@lists.sourceforge.net; Wed, 29 Sep 2021 11:59:09 +0000 From: Antonio Quartulli To: openvpn-devel@lists.sourceforge.net Date: Wed, 29 Sep 2021 13:59:05 +0200 Message-Id: <20210929115905.1281-1-a@unstable.cc> In-Reply-To: <202109291121.18TBLdrH038680@chekov.greenie.muc.de> References: <202109291121.18TBLdrH038680@chekov.greenie.muc.de> MIME-Version: 1.0 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: Our codestyle demands having brackets also around if-blocks made up by one line only. In patch "networking: add and implement net_addr_ll_set() API" this rule was not respected and a new one-line-if-block was added with no brackets. Content analysis details: (0.0 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-Headers-End: 1mVYEt-0000lD-QY Subject: [Openvpn-devel] [PATCH] networking: add missing brackets 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 Our codestyle demands having brackets also around if-blocks made up by one line only. In patch "networking: add and implement net_addr_ll_set() API" this rule was not respected and a new one-line-if-block was added with no brackets. Fix this by adding the related brackets as needed. Signed-off-by: Antonio Quartulli Acked-by: Gert Doering --- src/openvpn/networking_iproute2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/openvpn/networking_iproute2.c b/src/openvpn/networking_iproute2.c index c6623b19..67b8894b 100644 --- a/src/openvpn/networking_iproute2.c +++ b/src/openvpn/networking_iproute2.c @@ -107,7 +107,9 @@ net_addr_ll_set(openvpn_net_ctx_t *ctx, const openvpn_net_iface_t *iface, argv_msg(M_INFO, &argv); if (!openvpn_execve_check(&argv, ctx->es, M_WARN, "Linux ip link set addr failed")) + { ret = -1; + } argv_free(&argv);