From patchwork Tue Sep 22 00:00:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lev Stipakov X-Patchwork-Id: 1484 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director10.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id MAvILoz4cl/kAgAAIUCqbw (envelope-from ) for ; Tue, 29 Sep 2020 05:04:12 -0400 Received: from proxy8.mail.ord1d.rsapps.net ([172.30.191.6]) by director10.mail.ord1d.rsapps.net with LMTP id ONW0Loz4cl9XAwAApN4f7A (envelope-from ) for ; Tue, 29 Sep 2020 05:04:12 -0400 Received: from smtp16.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy8.mail.ord1d.rsapps.net with LMTPS id 2E5QLoz4cl9dCwAAGdz6CA (envelope-from ) for ; Tue, 29 Sep 2020 05:04:12 -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: smtp16.gate.ord1d.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: bd5ae5cc-0232-11eb-85ea-525400ca3ad5-1-1 Received: from [216.105.38.7] ([216.105.38.7:35668] helo=lists.sourceforge.net) by smtp16.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id A0/B7-13380-B88F27F5; Tue, 29 Sep 2020 05:04:12 -0400 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.90_1) (envelope-from ) id 1kNBXO-0003fz-Dn; Tue, 29 Sep 2020 09:03:06 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNBXN-0003ft-Ja for openvpn-devel@lists.sourceforge.net; Tue, 29 Sep 2020 09:03:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: 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=vJMOEw06KcP0Kd5SuBgXydN59y+FmUarM4QF5CJeQnw=; b=RhJbYsJJ2RFNYHX+HDaHr/bupd Pnb25WmF0KmQnQ7274DxjxywjXsT1ixsHHUD59UitKGlSBaA+3TnUVM2/NvL1IAeT0JfO1zRID15K mswS90nRB/HSi4NYyRk167OhnTyptJIXnlsIqjr8oSE03HGUmUTKMnTtvCkrDL3OvYIU=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To :MIME-Version:Content-Type:Content-Transfer-Encoding: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=vJMOEw06KcP0Kd5SuBgXydN59y+FmUarM4QF5CJeQnw=; b=OKjB1uUa3L9lUZ0aWXuvkqvTFH om1oSfzepDazgh6u1zHazJC43+p2EIgZuwPAUJqynZtO2KvS7otT5y2ddPqr0+i7zaF4VCMN7tjZ7 DbmacpIlnFEZSHA+Gmx/kedxkFByF4fyFFxV4sApptgP6FxZHcrLy7K3pFbGWO2o54CM=; Received: from mail-ej1-f66.google.com ([209.85.218.66]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.2) id 1kNBXB-009rMC-Uh for openvpn-devel@lists.sourceforge.net; Tue, 29 Sep 2020 09:03:05 +0000 Received: by mail-ej1-f66.google.com with SMTP id lo4so13898752ejb.8 for ; Tue, 29 Sep 2020 02:02:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vJMOEw06KcP0Kd5SuBgXydN59y+FmUarM4QF5CJeQnw=; b=QxliCd6ndoPaevrakK5x/WPKC6+tbZJnOHj3Te3+y4iWB21NcnsALF8ZbHbn++1z8q BeXm9ETlk2r/r5Lqt5VDcnR00+FytgvDcLmoD5VV21F6rUIxnrJDvOK8SQrUoNc6wNqa BJJ8nznp14wtkMrm0FSgnJ1Jg9ZvSTavIBCFhdL9DlXs10PZlUmdQHKX9kp4FjtdBKPB Nu8fZHrO4U8m6fn216J4Suw6jRMDbjHxzZsUOFfbUFM/cM8YlwkU9UGYdeTsIKYZd9Zf fbhA/jfiHryV+3BfSCLzAQ17359nkwWMcNW37PH21dYQRPXJauy4pIc3xExwmp1mbkEt 3BFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vJMOEw06KcP0Kd5SuBgXydN59y+FmUarM4QF5CJeQnw=; b=KZyxk5Qkq0iGm8DRwHkFAQ/TeMIJ/06OtIOMTPWo2IUVqSIwLcKahbosP9xVQyP82e cokiImBJ+Qr2xdae0R7HEMUg/a7RhcnUsdMX8HI5CdyqcRsz0VkrZrIjCRncir4ivrQB 1v2DqvW3KttJ8vYit1MPSbteb7xxehauj+AOLjeGsggAuhCpDN/izq2MYFWG/4qgd3C4 raGWwX4BTDO9cn5JIoGwXYP2wj+qBX3FMcKJeaGgFE5wfShj/D8jS6imNtMHzpAknWm9 lktGblbhgm6P+0ssWj4LaJdn3JyX9cnpdN8eQm0Da8c2ofjTvB5mNBpGB7g4HwuHyd8N Xewg== X-Gm-Message-State: AOAM533S12jnwDFTiSteHsqvmdgpT5krF7JOSMi66U+fCihxTKRTHApp JfRRszsVpvbxDALLPW6cJEtGtSIu/P4= X-Google-Smtp-Source: ABdhPJwXhZAnMmcwS8FXmv3AiLLfHHCyhIws3BYEkf0ni5TRbSy3z5WFYkKaqCdKB9C6PzPD93sq7w== X-Received: by 2002:a17:906:c957:: with SMTP id fw23mr2023176ejb.510.1601370160012; Tue, 29 Sep 2020 02:02:40 -0700 (PDT) Received: from LAPTOP-4L3N7KFS.localdomain (nat1.panoulu.net. [185.38.2.1]) by smtp.gmail.com with ESMTPSA id g25sm5362093edu.53.2020.09.29.02.02.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Sep 2020 02:02:39 -0700 (PDT) From: Lev Stipakov To: openvpn-devel@lists.sourceforge.net Date: Tue, 22 Sep 2020 13:00:21 +0300 Message-Id: <20200922100021.20329-1-lstipakov@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200929065535.GJ976@greenie.muc.de> References: <20200929065535.GJ976@greenie.muc.de> X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.218.66 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (lstipakov[at]gmail.com) 2.1 DATE_IN_PAST_96_XX Date: is 96 hours or more before Received: date 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] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.218.66 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Headers-End: 1kNBXB-009rMC-Uh Subject: [Openvpn-devel] [PATCH v2] Alias ADAPTER_DOMAIN_SUFFIX to DOMAIN 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: Lev Stipakov MIME-Version: 1.0 Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox From: Lev Stipakov ADAPTER_DOMAIN_SUFFIX is an openvpn3 replacement for DOMAIN, which is used there for split-dns. This option is pushed by modern Access Server. This change improves compatibility between OpenVPN community client and Access Server. Signed-off-by: Lev Stipakov Acked-by: Gert Doering --- v2: - fixed long line in C code - left out --help change - slightly changed man text doc/man-sections/vpn-network-options.rst | 4 ++++ src/openvpn/options.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/man-sections/vpn-network-options.rst b/doc/man-sections/vpn-network-options.rst index 825dd1ca..26682789 100644 --- a/doc/man-sections/vpn-network-options.rst +++ b/doc/man-sections/vpn-network-options.rst @@ -114,6 +114,10 @@ routing. :code:`DOMAIN` ``name`` Set Connection-specific DNS Suffix to :code:`name`. + :code:`ADAPTER_DOMAIN_SUFFIX` ``name`` + Alias to :code:`DOMAIN`. This is a compatibility option, it + should not be used in new deployments. + :code:`DOMAIN-SEARCH` ``name`` Add :code:`name` to the domain search list. Repeat this option to add more entries. Up to diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 4b22d3d9..3df803db 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -7440,7 +7440,8 @@ add_option(struct options *options, VERIFY_PERMISSION(OPT_P_IPWIN32); bool ipv6dns = false; - if (streq(p[1], "DOMAIN") && p[2]) + if ((streq(p[1], "DOMAIN") || streq(p[1], "ADAPTER_DOMAIN_SUFFIX")) + && p[2]) { o->domain = p[2]; }