From patchwork Thu May 2 09:53:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 3697 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:f212:b0:577:9287:30c5 with SMTP id sk18csp920944mab; Thu, 2 May 2024 02:53:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXdZavGVynSVy5mufZAEh67LnL116iV2Tq3vu8bSJSs0YXGWY288/QBoswl2+gW73/0z/cKYY7eOV2qhHAFHRibj21N4ns= X-Google-Smtp-Source: AGHT+IEDaUNq++omBfCJsbYjO3Ox3hPMtL5+ZXqs0qHDzIQeKsIz/AXoR0BSbTiem0nXt9xt2gFc X-Received: by 2002:a05:6a20:ddaf:b0:1af:5e20:148c with SMTP id kw47-20020a056a20ddaf00b001af5e20148cmr5880148pzb.2.1714643637786; Thu, 02 May 2024 02:53:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1714643637; cv=none; d=google.com; s=arc-20160816; b=gJS0ChyzRI7xk+lEiq+z78bObPieeDyM8j+FgcPSYCpQlsd/mwFAEvsdyIwmLcK9sU 1zbtkNUcwYKYDocAcOKVUGS3EOvqelLU1/AV4gaIaWxlFhYiro52gDLhyfqjxY2DagEe zb5wz3kWKO83V2IQ/zCyN80W8LxTRt+nqWbuN53qmR56txLiuJtML6c5vEVoZrhXMUy1 h3CckLZuGjcPkEcC/BbcEVYXUmee9MWZ9Jl4kjI8Vo4zLEUipYXOUEmt5e7j7VTw6+Ln B3RGQG5qdDKiDVUW8a8INTym7g0aaF+/CaYSSGjkUSzhvcTbZGP7d3sV+zC7bLsTxUZz qfPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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; bh=ecmT3VaV6A6AWPad7i+LhhQs3N/2wMVjNfppIiexz6g=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=aDWP7qx6XtMCDQfYeK6WttEjxRDZd0Iw4Iu/zJBk3n2aKCX5j6X5uSAIiMNKCwvphv 5AkIgI2RoKFDbFYJFH6g9Zx+PBBLsJxfSQoIwhe+ZNSCtd6Nh6EZFyFqHFAf6lii4HwX 6OzWSJaC1ilsLQsJwilP1598LMVrxMU4+2+iRh5NUyoIYOoERSzvno3FTQgB4WB9VCPs kRDP3e2PPG9LOH2NY5I9kPTb/Pj8G3eIrprQ/hnzUNuRIdE38PBn6HBBBu74TuCBIT89 iXV0e5h4Vf/yrptDE2o981XqHgAnB6TpGxe0oJabqAuDOXRwJb+LBmtLXT1Oh5CNgmxa y6/w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=S9vgNDef; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=JWQ7vsXj; 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 y9-20020a17090264c900b001ea963d0dd7si673348pli.140.2024.05.02.02.53.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 May 2024 02:53:57 -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=S9vgNDef; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=JWQ7vsXj; 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 [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1s2T8D-0003HC-R9; Thu, 02 May 2024 09:53:37 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1s2T8C-0003H6-M1 for openvpn-devel@lists.sourceforge.net; Thu, 02 May 2024 09:53:36 +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=Bll3MGSONxaOmSX2nN06FdGsLTKG9o8Cfrwgg8FDzAs=; b=S9vgNDef8FuWbJu5btMvJ2YK0Y hs8DBikQLxP++xj2Bx4q2XqNRYB0r6kuzyixWR1D0mJo8w1krFwbKk473RNhl8gfyayjsr2NIvkfn LG1LQ+CKNonKzo/F4LSOjex/0Y6KwK8F6yExZQ9ubXBlkMDb3OHtEpGZhU5xk70yIM3M=; 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=Bll3MGSONxaOmSX2nN06FdGsLTKG9o8Cfrwgg8FDzAs=; b=JWQ7vsXjW6J/OKfFmQe2bVbC5m lNFRdzcGPUiwJqCHao2t/lZCNqwuK+UTtlQERmK11jsye9hnHIuYMfkMSFQQEJRxJG8FyGUyuKd7b 0YI92QeZXx+MyfBmNEEaTclq42xpOmGdvUxgVY+wXZJKl/1RQHe/E6VtN8i5OKLbxoXQ=; Received: from dhcp-174.greenie.muc.de ([193.149.48.174] 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 1s2T8B-0001qZ-4K for openvpn-devel@lists.sourceforge.net; Thu, 02 May 2024 09:53:36 +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 4429rNlM009443 for ; Thu, 2 May 2024 11:53:23 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.17.1.9/8.17.1.9/Submit) id 4429rNYQ009442 for openvpn-devel@lists.sourceforge.net; Thu, 2 May 2024 11:53:23 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Thu, 2 May 2024 11:53:22 +0200 Message-ID: <20240502095322.9433-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.43.2 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: -5.0 (-----) 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: From: Frank Lichtenheld Both values are boolean so there is no reason to use "|" and it just confuses the reader whether there is something more going on here. Change-Id: Ie61fa6a78875ecbaa9d3d8e7a50603d77c9ce09e Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering --- Content analysis details: (-5.0 points, 6.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. [URIs: openvpn.net] -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [193.149.48.174 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record X-Headers-End: 1s2T8B-0001qZ-4K Subject: [Openvpn-devel] [PATCH v1] Fix "binary or" vs "boolean or" related to server_bridge_proxy_dhcp 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?1797934167625430753?= X-GMAIL-MSGID: =?utf-8?q?1797934167625430753?= From: Frank Lichtenheld Both values are boolean so there is no reason to use "|" and it just confuses the reader whether there is something more going on here. Change-Id: Ie61fa6a78875ecbaa9d3d8e7a50603d77c9ce09e Signed-off-by: Frank Lichtenheld 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/+/553 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering diff --git a/src/openvpn/helper.c b/src/openvpn/helper.c index 1bab84c..24dee97 100644 --- a/src/openvpn/helper.c +++ b/src/openvpn/helper.c @@ -427,7 +427,7 @@ * if !nogw: * push "route-gateway dhcp" */ - else if (o->server_bridge_defined | o->server_bridge_proxy_dhcp) + else if (o->server_bridge_defined || o->server_bridge_proxy_dhcp) { if (o->client) { diff --git a/src/openvpn/init.c b/src/openvpn/init.c index 02205e7..e67f10e 100644 --- a/src/openvpn/init.c +++ b/src/openvpn/init.c @@ -3565,7 +3565,7 @@ msg(M_WARN, "WARNING: using --pull/--client and --ifconfig together is probably not what you want"); } - if (o->server_bridge_defined | o->server_bridge_proxy_dhcp) + if (o->server_bridge_defined || o->server_bridge_proxy_dhcp) { msg(M_WARN, "NOTE: when bridging your LAN adapter with the TAP adapter, note that the new bridge adapter will often take on its own IP address that is different from what the LAN adapter was previously set to"); }