From patchwork Wed Nov 25 17:11:28 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 5786 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:6022:91c9:10b0:11b:d6c:f273 with SMTP id tl9-n1csp6025124lad; Wed, 25 Nov 2026 09:11:47 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErH279twBeegiRaBuQaCPQddZM23UrYmLbIrUZiXd+6OntZcKY0jBBgHQttUNZm2CT1b38G9FWP/aYk=@openvpn.net X-Received: by 2002:a05:6820:c30f:b0:71a:f754:a22d with SMTP id 006d021491bc7-71b3957ed4fmr12626795eaf.76.1795626707140; Wed, 25 Nov 2026 09:11:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1795626707; cv=none; d=google.com; s=arc-20260327; b=MZJcN6puW+/HmFiZv/LOCvpuvlrP+nvWrdjMPLGfkiYXtW6AgWyx9o3awaoX5SVatP FD3pRNllRd3frztp6oCKulR19pqEikMiajKCpAyan97i3YDAWQ9p9+cBSNuilsB7wKor gd+9VA9mBN7TR2+sBbWSCpw7daHAbhytBsFI7NJ5NQ6iL6vl8wDLpY7EIclCJpNZ982w VchWIxP+141KFmwCVjvKmnN+boYhVC1jJjjw4m+5EXSnPqbe1ghkhz0JLToien4LuOcA kLKg3BgDvsdFGzSgpt67A4phRORIF28H7lE0YiQ/dDstLmLoRWYkOzBCSoeTe98AywcF 6SlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; 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:dkim-signature; bh=n919RgrpPDeNHVaMISe8FUxYHiA3b5hnIk6+8CxDEwE=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=QE9C1AZ/xicf0Td3MToTmeqqZ8AFgDZj0Uzsmlvf+f9B3oU6NEknqYlcSRas8AvmZw 235HrkDo3DO467PQioXv5HCQBp3qcYrMrRBi5zdDx7MdCpnLgfm3Hs5oroBeLgUANqFN yEtuWhBg2Wno87MfZ5IyAJxBmCvvCnZ141+7Zs1lEd/Uf/MR891Gc6BCN/95BgugPDko n9qLMHiubwGWSvdrpX5iKH5xaAHSpXLk5+e/ZrsKpNbjTMUsFkssN8wbd2uFm5QOIafr BXWi0QPFzmQXOcIHVkbMGedFgtUV2GoEhvLObuuFs9Kr0xhrQOTH1UeWfWQvr2B1btRW 6GVw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=TI5ksLk+; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=dOoVise0; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=dNh0+w4P; 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 006d021491bc7-71b382cd57csi25368804eaf.67.2026.11.25.09.11.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Nov 2026 09:11:47 -0800 (PST) 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=TI5ksLk+; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=dOoVise0; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=dNh0+w4P; 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 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: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:MIME-Version:References:In-Reply-To:Message-ID:Date:To:From:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=n919RgrpPDeNHVaMISe8FUxYHiA3b5hnIk6+8CxDEwE=; b=TI5ksLk+ymwGPC RrKv7SnakdDBszSeOZdKK8rIwd9Rew+rbw9Wc0/wW3LTXyPv2QYcQUvTOUskSptZgZfuhZlHQk0tQ vvD2yF6i/OrZoSGObu6rwcrqMCySTRUZuYHW4znotcS7TDzvTeXo0l01cyDfg/EhjJzoobvXwUeTE QYc=; 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.100.1) (envelope-from ) id 1xWGX2-0000000076v-42ri; Wed, 25 Nov 2026 17:11:44 +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.100.1) (envelope-from ) id 1xWGX1-0000000076g-1pE5 for openvpn-devel@lists.sourceforge.net; Wed, 25 Nov 2026 17:11: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: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-Unsubscribe-Post:List-Subscribe:List-Post:List-Owner:List-Archive; bh=+wHp2Ex+6AbFFCG3RwlQhtkrTYtgxAbEtzNEXvYjFWU=; b=dOoVise01rUatYp9bo2Y+aLB2C MWpycPGkUjwNHH3hj/Olw8pl3li4ZkurIqZcnL7ogRRCEX9bTVgCCMXV7PQlbDfaqlqSpE4mOcwL9 zK9yQwXyVN0xe+u0eQbOuX4oQzC90NbN/QhWA1W4rTs4W1YuTO8/ynFJNK4a3IVS3KQU=; 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-Unsubscribe-Post: List-Subscribe:List-Post:List-Owner:List-Archive; bh=+wHp2Ex+6AbFFCG3RwlQhtkrTYtgxAbEtzNEXvYjFWU=; b=dNh0+w4P3zAPyiwCv+kL4yqtxs fF4rLiYdL5gb4FQvnuUPeC17fgO1eiy181LuX+wQW/617n8Q17hTauItvCEB0f5O8cmrnfJ98vqQu 76feZY6KcS9lLVKNT2LcFRjVxeO7p+WqAaVHQ+DBrl6NgNthjvXEfpZilNt4lwPuh+pg=; Received: from [193.149.48.129] (helo=blue.greenie.muc.de) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.100.1) id 1xWGWz-000000005Sw-2l8i for openvpn-devel@lists.sourceforge.net; Wed, 25 Nov 2026 17:11:43 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.18.1/8.18.1) with ESMTP id 6APHBYvQ021410 for ; Wed, 25 Nov 2026 18:11:34 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 6APHBYWq021409 for openvpn-devel@lists.sourceforge.net; Wed, 25 Nov 2026 18:11:34 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Wed, 25 Nov 2026 18:11:28 +0100 Message-ID: <20261125171133.21392-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.55.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "sfi-spamd-2.hosts.colo.sdot.me", 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: Razvan Cojocaru - push_option_ex(): drop the "enable" parameter; it was ignored and every caller passed true. - push_remove_option(): drop the NULL check on o, already dereferenced by the ifconfig/ifconfig-ipv6 check [...] Content analysis details: (1.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_DNSWL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to DNSWL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#DnsBlocklists-dnsbl-block for more information. [193.149.48.129 listed in list.dnswl.org] 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1xWGWz-000000005Sw-2l8i Subject: [Openvpn-devel] [PATCH v2] push: remove dead code 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: 1882851070058211700 X-GMAIL-MSGID: 1882851070058211700 From: Razvan Cojocaru - push_option_ex(): drop the "enable" parameter; it was ignored and every caller passed true. - push_remove_option(): drop the NULL check on o, already dereferenced by the ifconfig/ifconfig-ipv6 checks above it. - receive_auth_failed(): drop a repeated no_advance = true and a BLEN() check implied by the preceding "CRV1:" prefix match, and the blank line hiding that the auth-token check is an else-if of the TEMP one. Change-Id: I0f659eb20441edd411ec13f4d09f434141b2da32 Signed-off-by: Razvan Cojocaru Acked-by: Frank Lichtenheld Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2344 --- 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/+/2344 This mail reflects revision 2 of this Change. Acked-by according to Gerrit (reflected above): Frank Lichtenheld diff --git a/src/openvpn/push.c b/src/openvpn/push.c index eb11107..274f652 100644 --- a/src/openvpn/push.c +++ b/src/openvpn/push.c @@ -75,7 +75,6 @@ parse_auth_failed_temp(&c->options, reason + strlen("TEMP")); register_signal(c->sig, SIGUSR1, "auth-temp-failure (server temporary reject)"); } - /* Before checking how to react on AUTH_FAILED, first check if the * failed auth might be the result of an expired auth-token. * Note that a server restart will trigger a generic AUTH_FAILED @@ -85,7 +84,6 @@ { /* SOFT-SIGUSR1 -- Auth failure error */ register_signal(c->sig, SIGUSR1, "auth-failure (auth-token)"); - c->options.no_advance = true; } else { @@ -117,7 +115,7 @@ /* * Save the dynamic-challenge text even when management is defined */ - if (authfail_extended && buf_string_match_head_str(&buf, "CRV1:") && BLEN(&buf)) + if (authfail_extended && buf_string_match_head_str(&buf, "CRV1:")) { ssl_put_auth_challenge(CBSTR(&buf)); } @@ -931,7 +929,7 @@ } static void -push_option_ex(struct gc_arena *gc, struct push_list *push_list, const char *opt, bool enable, +push_option_ex(struct gc_arena *gc, struct push_list *push_list, const char *opt, msglvl_t msglevel) { if (!string_class(opt, CC_ANY, CC_COMMA)) @@ -962,7 +960,7 @@ void push_option(struct options *o, const char *opt, msglvl_t msglevel) { - push_option_ex(&o->gc, &o->push_list, opt, true, msglevel); + push_option_ex(&o->gc, &o->push_list, opt, msglevel); } void @@ -974,7 +972,7 @@ push_reset(o); while (e) { - push_option_ex(&o->gc, &o->push_list, string_alloc(e->option, &o->gc), true, M_FATAL); + push_option_ex(&o->gc, &o->push_list, string_alloc(e->option, &o->gc), M_FATAL); e = e->next; } } @@ -1002,7 +1000,7 @@ { return false; } - push_option_ex(gc, push_list, string_alloc(tmp, gc), true, msglevel); + push_option_ex(gc, push_list, string_alloc(tmp, gc), msglevel); return true; } @@ -1031,7 +1029,7 @@ return; } - if (o && o->push_list.head) + if (o->push_list.head) { struct push_entry *e = o->push_list.head;