From patchwork Fri Nov 27 13:35:25 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 5806 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:6022:91c9:10b0:11b:d6c:f273 with SMTP id tl9-n1csp8785652lad; Fri, 27 Nov 2026 05:35:48 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErE7q7eWKrWqM7O80DrFkfdi2clPN5G7A7KoR3JjVBFlwKC0pq5XoEE5ldN1DkT2q+2jEBVKKPtBjKo=@openvpn.net X-Received: by 2002:a05:6a20:6a08:b0:3f9:3f64:9b9f with SMTP id adf61e73a8af0-4014d2549c0mr28216236637.25.1795786548246; Fri, 27 Nov 2026 05:35:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1795786548; cv=none; d=google.com; s=arc-20260327; b=FRVAJ7hPP37J0mQjIFLGTduVcicNxAN3Tko9pGD2E2p7bBN3WILOnsDPPWkHFrFmFV MCMBpE24lvO57RBGuCzJmUou2E/voTtGE2gSlgKVEt22OTtXvtxr4kR4xmpTy2KEAaXy u4meoiPtLEyF3sxA/hAl8EgF4hqyf7mBfm6FdiuLZWWU1FobdPkT8hOnLi0ho6T5wX6L Q7rJBRpPlEpK7WO3zb7rP8k/tIjBV2F/XG/EqyikrfucK+NgDNzAoIwiV8FuqE3t2tVe kx3FFsBaEeg7qMHzh8KjxsRQ/2vtZCtdST4jPgP1CA7bUfKirweI4l3Bl5XO8hnfJpXj TDlw== 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=fR2LjIScAzdOPLTy9F1LzQXjLipt7/t2Coj0t+cAsb8=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=eg/2CKdtdLq0xemj1MDbDqMTajBmDwiCZ+pPx2arwqBvr/JwPSzGza7tuioRk1EpIa EdvOJjkfrl5VJWKouO1VFQY/is58XJX9x1JnUlZ/HOrXfpmTq5SYbJGi2bnbSX8zfPgD sftE8B8wlejs/HSUSs3tEn7gUb/Lp2c+qMw2ZGZOEKjWBrHihYOrj8Daztbr5Gh8c+JL Nem8motXDipbq2Hin6lcc9rrG8UCefhYP4+Zmd7cElj4Yf6yybwK5KN7vfCQWLoPeJ8A bQiNuNscvB2/sW0t6PdqR4GsY2uhKNaxMF+tNQxo1SWqwHpmAChebebhk+Q2OaexTvAD a5ew==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=dLV0wFPa; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=CJBpOo2H; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=W1XjNmoD; 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 d2e1a72fcca58-8c87333f20esi54207927b3a.92.2026.11.27.05.35.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Nov 2026 05:35:48 -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=dLV0wFPa; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=CJBpOo2H; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=W1XjNmoD; 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=fR2LjIScAzdOPLTy9F1LzQXjLipt7/t2Coj0t+cAsb8=; b=dLV0wFParnsDQ6 srIxB8GVBpa4EwbPwfwlQF89BNUsdaEy/NAWL7AMB7g9EBdhSscmPaWK1XBGu5WUQCqFErAogRu7b vQO57var1LSF7Qel1Q981ncetJWtrTPyFUzP4UEF1vJaKGEuF6A6P4li8ierSCA+tKQUev6kl6SMF klQ=; 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.100.1) (envelope-from ) id 1xWw74-000000006Qt-1x9I; Fri, 27 Nov 2026 13:35:42 +0000 Received: from [172.30.29.66] (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.100.1) (envelope-from ) id 1xWw72-000000006Ql-20FV for openvpn-devel@lists.sourceforge.net; Fri, 27 Nov 2026 13:35:40 +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=PGWn0Pb8uFwYa23D9lM7Wfkao/378O6MipBJmWBabNo=; b=CJBpOo2HaZYAMLYpCBvBeWolKs RQ0gEUsOk4LrZvog7OyMiOFAPj0InzfUyjV4x/N1Q0wjt65xxtGsI5E5ZYqzIUbL/awiL1fygJUtE LKptSRFJCdxqSwudWAdOAhV8niY8n7wNDrB+d2U5jKXO5rHcj/qf+lKXXHdUMmPzrpVM=; 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=PGWn0Pb8uFwYa23D9lM7Wfkao/378O6MipBJmWBabNo=; b=W1XjNmoD/xBmWO+Zx6UcDBnP9/ pmM5F/zZ9fiMmq5baLppRWTnkqQPusRCiLIkj2OhaktaDxRvDBc64uxPnra2SHQEViojI3y7cJ+QI aRz0g4K4tUOUBQyMvxrM3agfxDL4Fopac4B0mnIGY6liOW1cZQ6E4IK1yC31Hl7wWVqA=; Received: from [193.149.48.129] (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.100.1) id 1xWw70-000000001ei-2JDV for openvpn-devel@lists.sourceforge.net; Fri, 27 Nov 2026 13:35:40 +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 6ARDZV2U030250 for ; Fri, 27 Nov 2026 14:35:31 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 6ARDZVGq030249 for openvpn-devel@lists.sourceforge.net; Fri, 27 Nov 2026 14:35:31 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Fri, 27 Nov 2026 14:35:25 +0100 Message-ID: <20261127133530.30238-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-1.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: Marco Baffo Reset DNS records without clearing the local DNS up/down command and flags when PUSH_UPDATE replaces or removes DNS options. Change-Id: Ib20f4965f25472f47b98981d54eaf4e2269d7408 Signed-off-by: Marco Baffo Acked-by: Razvan Cojocaru Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+ [...] Content analysis details: (1.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1xWw70-000000001ei-2JDV Subject: [Openvpn-devel] [PATCH v2] options: preserve --dns-updown across PUSH_UPDATE 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: 1883018676111085674 X-GMAIL-MSGID: 1883018676111085674 From: Marco Baffo Reset DNS records without clearing the local DNS up/down command and flags when PUSH_UPDATE replaces or removes DNS options. Change-Id: Ib20f4965f25472f47b98981d54eaf4e2269d7408 Signed-off-by: Marco Baffo Acked-by: Razvan Cojocaru Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2360 --- 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/+/2360 This mail reflects revision 2 of this Change. Acked-by according to Gerrit (reflected above): Razvan Cojocaru diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 1e0b4d8..c35740d 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -3619,8 +3619,16 @@ static void reset_dns_options(struct options *options) { - gc_free(&options->dns_options.gc); - CLEAR(options->dns_options); + struct dns_options *dns = &options->dns_options; + const char *updown = dns->updown; + enum dns_updown_flags updown_flags = dns->updown_flags; + + gc_free(&dns->gc); + CLEAR(*dns); + + /* --dns-updown is local configuration, not pushed */ + dns->updown = updown; + dns->updown_flags = updown_flags; } static void