From patchwork Tue Nov 29 18:05:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selva Nair X-Patchwork-Id: 2870 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director15.mail.ord1d.rsapps.net ([172.27.255.53]) by backend30.mail.ord1d.rsapps.net with LMTP id WNFcODNKhmNlZgAAIUCqbw (envelope-from ) for ; Tue, 29 Nov 2022 13:06:43 -0500 Received: from proxy8.mail.iad3a.rsapps.net ([172.27.255.53]) by director15.mail.ord1d.rsapps.net with LMTP id gPIJODNKhmOJQwAAIcMcQg (envelope-from ) for ; Tue, 29 Nov 2022 13:06:43 -0500 Received: from smtp31.gate.iad3a ([172.27.255.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy8.mail.iad3a.rsapps.net with LMTPS id 8ASpLzNKhmOhcQAAsBr/qg (envelope-from ) for ; Tue, 29 Nov 2022 13:06:43 -0500 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: smtp31.gate.iad3a.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; dkim=fail (signature verification failed) header.d=gmail.com; dmarc=fail (p=none; dis=none) header.from=gmail.com X-Suspicious-Flag: YES X-Classification-ID: 942d5b00-7010-11ed-8c0c-5254003d9392-1-1 Received: from [216.105.38.7] ([216.105.38.7:57654] helo=lists.sourceforge.net) by smtp31.gate.iad3a.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 1B/FE-28631-33A46836; Tue, 29 Nov 2022 13:06:43 -0500 Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1p04zK-0006Pq-1w; Tue, 29 Nov 2022 18:05:46 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1p04zH-0006Pj-Sm for openvpn-devel@lists.sourceforge.net; Tue, 29 Nov 2022 18:05:43 +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=qW2QD00ZKKlfmr3x+pJw1UDjxNX7EjedQIjZog56ZTQ=; b=Gfg/jPnU4UD+cERX5P66muGC+d zgF8nUTGj5FWG3yJhBBgdHbhf4WUxN/fpmatt2tw+ioxxPiki+uTsnRcQ14oNGkdvtny1Ch+GZM9C yQLZxWcmy1dSVHi/8CErL/b6fZriHms6mp3tUk0o6zS3y/sP/TzSSR/vpcin2qAGCSeI=; 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=qW2QD00ZKKlfmr3x+pJw1UDjxNX7EjedQIjZog56ZTQ=; b=J EHY86H01Nnzxj/Iyp9TDBQjOSG0hvQbPFBh37AHcWBtl1UCFWSt7j8wBkPm8sJzBRrXLgr/Mixw5v 0QKBAdzWzkEtDaultxc2tbCiGStZHuSRzdxYTQr0XUKP0kcpVrALJtKm+4wHstwCDHGb2THz5Ok+i aoPFEF5kJJw5icr4=; Received: from mail-io1-f47.google.com ([209.85.166.47]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1p04zH-000UHt-Bv for openvpn-devel@lists.sourceforge.net; Tue, 29 Nov 2022 18:05:43 +0000 Received: by mail-io1-f47.google.com with SMTP id n188so10615410iof.8 for ; Tue, 29 Nov 2022 10:05:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=qW2QD00ZKKlfmr3x+pJw1UDjxNX7EjedQIjZog56ZTQ=; b=j5YEzlJihI8DmkY9Fy3LRlsAOMtm9NJbm1Xg7bjQvprqb3PovWk4DzopqZ94ltsIly W4NCJ9zlub3JfE10385yMP5nzBs/kia8YyaHpX2QKpEVCaKD4tYzHFxubYCc1TInAEkH GHQLvkgXBFq5VUrosdLU50k0ou0fZidod8BS8ySAieMOcU1YmH1DM9Kbj7iPoHrZo+D7 oWwXadMHt6CnWU3XdHRswqrhWOJJU7kZQtRzmbWc67uODufJiKRrSoEDuwjFxooEQ/Lp r2ovyqrYXM3KfHBjDb6xilzC9eaLK5z0B63+x3k3RPvRLxI9Mu61sTjJk29nXC2eWMlk kjFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=qW2QD00ZKKlfmr3x+pJw1UDjxNX7EjedQIjZog56ZTQ=; b=DPlwNu5S9mcawdKcya91cuK0QsUTn4ORjQRLnPPPaVKGY5TpVIGaKZglkyB01opD79 tt8Tp5YXkwVfRwaH+lqHo0UMDKbnwQZQoK/jZyn2HR+a3bqm7Hte7QTvNajgcdGwskC7 RE9803maZXdn5wZtLy74+eB1PnOzjctPiLgKxcygL0a6IxZ83B5QugeCwABraTZOoHCS /nEfQ4dVBLGmVIW78bwGkVAbQF4hwlm9RCUdsgUC04sLP4LZmRz9s+JBPJkd9TF3HwK7 NVs0T+VVLNVPaXHyeHNnBsycV/5wp20vNHHdB3CECDE5xqRamg+WKLY5V/x2YwdQ0G9I Y0Sw== X-Gm-Message-State: ANoB5pnsfarbKnwxyFUpHGvOXggRK96Isvu4uj3ojj1SaTMcm3X6yvyh sbgs6LJBEXwFvebfqIuKcqRElWP/vCY= X-Google-Smtp-Source: AA0mqf77pA5frg6N4UrdiR7OC1meQOHPsr1Mc2zHrIChk5z18NPTsN78wpC5icTIJVFA79mP/yhIwQ== X-Received: by 2002:a02:a596:0:b0:363:a127:4cf9 with SMTP id b22-20020a02a596000000b00363a1274cf9mr26783155jam.66.1669745137510; Tue, 29 Nov 2022 10:05:37 -0800 (PST) Received: from uranus.sansel.ca (bras-vprn-tnhlon4053w-lp130-01-70-51-222-66.dsl.bell.ca. [70.51.222.66]) by smtp.gmail.com with ESMTPSA id z10-20020a056602080a00b006c75c702342sm5675350iow.14.2022.11.29.10.05.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Nov 2022 10:05:37 -0800 (PST) From: selva.nair@gmail.com To: openvpn-devel@lists.sourceforge.net Date: Tue, 29 Nov 2022 13:05:34 -0500 Message-Id: <20221129180534.657529-1-selva.nair@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.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: Selva Nair It seems sometimes comma-separated pulled options have an offending leading space. Not sure whether that is an error, but the change here matches the behaviour of option parsing. Signed-off-by: Selva Nair --- src/openvpn/options.c | 6 ++++++ 1 file changed, 6 insertions(+) Content analysis details: (-0.2 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 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [selva.nair[at]gmail.com] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -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.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.166.47 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.166.47 listed in wl.mailspike.net] X-Headers-End: 1p04zH-000UHt-Bv Subject: [Openvpn-devel] [PATCH] pull_filer: ignore leading "spaces" in option names 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 From: Selva Nair It seems sometimes comma-separated pulled options have an offending leading space. Not sure whether that is an error, but the change here matches the behaviour of option parsing. Signed-off-by: Selva Nair --- src/openvpn/options.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/openvpn/options.c b/src/openvpn/options.c index b7b34c9c..94cbd659 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -5385,6 +5385,12 @@ apply_pull_filter(const struct options *o, char *line) return true; } + /* skip leading spaces matching the behaviour of parse_line */ + while(*line && space(*line)) + { + line++; + } + for (f = o->pull_filter_list->head; f; f = f->next) { if (f->type == PUF_TYPE_ACCEPT && strncmp(line, f->pattern, f->size) == 0)