From patchwork Sun Sep 20 05:27:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lev Stipakov X-Patchwork-Id: 1478 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director10.mail.ord1d.rsapps.net ([172.31.255.6]) by backend30.mail.ord1d.rsapps.net with LMTP id 6MKUJGaVbF/XXwAAIUCqbw (envelope-from ) for ; Thu, 24 Sep 2020 08:47:34 -0400 Received: from proxy3.mail.iad3b.rsapps.net ([172.31.255.6]) by director10.mail.ord1d.rsapps.net with LMTP id oHx4JGaVbF+UEgAApN4f7A (envelope-from ) for ; Thu, 24 Sep 2020 08:47:34 -0400 Received: from smtp23.gate.iad3b ([172.31.255.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy3.mail.iad3b.rsapps.net with LMTPS id kNgkHWaVbF9BGQAAM8Wetg (envelope-from ) for ; Thu, 24 Sep 2020 08:47:34 -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: smtp23.gate.iad3b.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: 1d6ac63a-fe64-11ea-bd89-525400aa5716-1-1 Received: from [216.105.38.7] ([216.105.38.7:38080] helo=lists.sourceforge.net) by smtp23.gate.iad3b.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id B9/9E-02158-5659C6F5; Thu, 24 Sep 2020 08:47:34 -0400 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.90_1) (envelope-from ) id 1kLQds-0005wY-Pd; Thu, 24 Sep 2020 12:46:32 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kLQdX-0005tZ-G9 for openvpn-devel@lists.sourceforge.net; Thu, 24 Sep 2020 12:46:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=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:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=eDpqFSZ/+tQtV/Dvex62GKmeomi2k1YPZ/7Z6kPULS8=; b=HQhWGntdhUrFflUG3aUhZ8+hL1 v2BR/PxeufeaX3e7rmg38waSAfBq0eTZI0s3PI1y4ZCwbuvAGx+AXJQGdBnubwAfGbpEY6YcqxT3e ekgMDqyULRnTW+vqaZLb6XrzLH+XTGAYOlwIM3C6zpnPOKeCCitQB0BqSB+rnWLEYRk8=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=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: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=eDpqFSZ/+tQtV/Dvex62GKmeomi2k1YPZ/7Z6kPULS8=; b=WX2pqj9EOyuPtmc2szhE9us222 pmc8LgKNxWWO/YPjHFuCu9Q2HgCZnLpEuUbUFhZfURwHPFMUBLyiF1BnSZ9ONWdZttQlqjdm8qD/C u3DxDfm6+shihVY0SbM/NG8x3FMDvzjBpmK+6YmjUb6AXWFTpi7ocW4KtON2vlQVK97E=; Received: from mail-wr1-f65.google.com ([209.85.221.65]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.2) id 1kLQdQ-0040Uk-TU for openvpn-devel@lists.sourceforge.net; Thu, 24 Sep 2020 12:46:11 +0000 Received: by mail-wr1-f65.google.com with SMTP id o5so3604552wrn.13 for ; Thu, 24 Sep 2020 05:46:04 -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; bh=eDpqFSZ/+tQtV/Dvex62GKmeomi2k1YPZ/7Z6kPULS8=; b=apQIVB1zFVrcfxHJd7KLSa5SCv0Q4NyWORRqP/MIt36COyg6K+y356BXc7DJefJ2qY edm1Bp+zH2S7XhpQ5EfIv/jm6Ipw4eilxeUgMEskAX1f8tMfkq2kcmGZmYVF4Faohptm 7Pco0AhF+Y0+sDNlNZa5Fa3JjiB9hoGMuKqo+sRg3KvEheoBsg1WTl6316Zu624avSUX xsgfD56k9o8qhkJjqUQph4AKWfm3sstaRrkT+ZVL/Mb5FWwubq0BzhHAcEL6rKhMdjXX I/XFvHoeO3+jcdd/g9gcqZwc0tcD02bj6oYEZtOgAcPJTprB1a3KAjFOahqmt3FuoVD1 nJ/w== 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; bh=eDpqFSZ/+tQtV/Dvex62GKmeomi2k1YPZ/7Z6kPULS8=; b=n+JcSWsPDhj2HqT0snVncPEOC7SOt4L4CB2BAjt+lQ5Ztd+qx/GT5Gzo1eRGP4Eq08 OkvvGS8VH/JbDFZfuQMKuNWn/K7w8eoRo1qHdKmdFcfoPMeYgS51bno6fh22H9jfE05G 7YtRrpLsHMLsnOTHGI0/rYbojEYfj05qhxKt5VY6VfpVVDIWL3/Vn2WBv6uDZH9IRZWM CRdNPkPFpDL63EqDmjKOyfnSyg7Fy+xjBQcxOI2NymuUs7Ckr3OoNnQlEZCv7Tp5PnQ0 fvqrlgSicsovPn43D+rbJwnF0Sxe4mcvNnZjJoNPV8OjpPNrtG+wxxYD//zW66871gAO krtA== X-Gm-Message-State: AOAM5335356KDTJcxmd3YSJyPEVv7I03QWnsMC2dm8BQ/mJodXDgOJ/T lpCTGFP01qOlZ0iZMpEkve5VsUHw7EE= X-Google-Smtp-Source: ABdhPJyVYA4gLPqpTHJ2VAYQAVh96cDsxIhCzaKhz0ExBbtbH7p5lMiMjzhiP/mBIxSi9FFYRVVEIQ== X-Received: by 2002:adf:f586:: with SMTP id f6mr4887171wro.299.1600951558101; Thu, 24 Sep 2020 05:45:58 -0700 (PDT) Received: from LAPTOP-4L3N7KFS.localdomain (nat2.panoulu.net. [185.38.2.2]) by smtp.gmail.com with ESMTPSA id 63sm3784446wrh.71.2020.09.24.05.45.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Sep 2020 05:45:57 -0700 (PDT) From: Lev Stipakov To: openvpn-devel@lists.sourceforge.net Date: Sun, 20 Sep 2020 18:27:38 +0300 Message-Id: <20200920152738.20086-1-lstipakov@gmail.com> X-Mailer: git-send-email 2.17.1 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (lstipakov[at]gmail.com) -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.221.65 listed in wl.mailspike.net] 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_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.221.65 listed in list.dnswl.org] -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 X-Headers-End: 1kLQdQ-0040Uk-TU Subject: [Openvpn-devel] [PATCH] 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 is pushed by modern Access Server. This change improves compatibility between OpenVPN community client and Access Server. Signed-off-by: Lev Stipakov --- doc/man-sections/vpn-network-options.rst | 3 +++ src/openvpn/options.c | 21 +++++++++++---------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/doc/man-sections/vpn-network-options.rst b/doc/man-sections/vpn-network-options.rst index 825dd1ca..dbc51e6c 100644 --- a/doc/man-sections/vpn-network-options.rst +++ b/doc/man-sections/vpn-network-options.rst @@ -114,6 +114,9 @@ routing. :code:`DOMAIN` ``name`` Set Connection-specific DNS Suffix to :code:`name`. + :code:`ADAPTER_DOMAIN_SUFFIX` ``name`` + Set Connection-specific DNS Suffix to :code:`name`. + :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..bcff0611 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -715,16 +715,17 @@ static const char usage_message[] = " be used with --ip-win32 dynamic. For options\n" " which allow multiple addresses,\n" " --dhcp-option must be repeated.\n" - " DOMAIN name : Set DNS suffix\n" + " DOMAIN name : Set DNS suffix\n" + " ADAPTER_DOMAIN_NAME : alias to DOMAIN\n" " DOMAIN-SEARCH entry : Add entry to DNS domain search list\n" - " DNS addr : Set domain name server address(es) (IPv4 and IPv6)\n" - " NTP : Set NTP server address(es)\n" - " NBDD : Set NBDD server address(es)\n" - " WINS addr : Set WINS server address(es)\n" - " NBT type : Set NetBIOS over TCP/IP Node type\n" - " 1: B, 2: P, 4: M, 8: H\n" - " NBS id : Set NetBIOS scope ID\n" - " DISABLE-NBT : Disable Netbios-over-TCP/IP.\n" + " DNS addr : Set domain name server address(es) (IPv4 and IPv6)\n" + " NTP : Set NTP server address(es)\n" + " NBDD : Set NBDD server address(es)\n" + " WINS addr : Set WINS server address(es)\n" + " NBT type : Set NetBIOS over TCP/IP Node type\n" + " 1: B, 2: P, 4: M, 8: H\n" + " NBS id : Set NetBIOS scope ID\n" + " DISABLE-NBT : Disable Netbios-over-TCP/IP.\n" "--dhcp-renew : Ask Windows to renew the TAP adapter lease on startup.\n" "--dhcp-pre-release : Ask Windows to release the previous TAP adapter lease on\n" " startup.\n" @@ -7440,7 +7441,7 @@ 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]; }