]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Add a note that ncp-ciphers is replaced by data-ciphers
authorArne Schwabe <arne@rfc2549.org>
Fri, 24 Jul 2020 14:25:57 +0000 (16:25 +0200)
committerGert Doering <gert@greenie.muc.de>
Mon, 27 Jul 2020 08:17:30 +0000 (10:17 +0200)
This patch adds a message that informs the user that the ncp-cipher
is renamed to data-ciphers. This should address the following concerns:

 - Users being confused by old options.
 - Nudge users to use the modern variant of an option

The man page already documents ncp-ciphers as an old name for
data-ciphers, so looking it up in the man page will also work.

Note that I did not add "deprecated old option" to this message
since I still think that eventually removing the option will only
break configs and we gain almost nothing from that.

Also still accepting the option even though we do not recommend usage of
it also follows the robustness principle of:
"be strict in what you send and tolerant in what you receive"

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20200724142557.25204-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg20573.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/options.c

index 58272221dfe6c2b4030d6985d5d3a77f1508b161..bc256b18ee07c1642e4464b2ad4cba5c30d50b7c 100644 (file)
@@ -7867,6 +7867,11 @@ add_option(struct options *options,
             && p[1] && !p[2])
     {
         VERIFY_PERMISSION(OPT_P_GENERAL|OPT_P_INSTANCE);
+        if (streq(p[0], "ncp-ciphers"))
+        {
+            msg(M_INFO, "Note: Treating option '--ncp-ciphers' as "
+                        " '--data-ciphers' (renamed in OpenVPN 2.5).");
+        }
         options->ncp_ciphers = p[1];
     }
     else if (streq(p[0], "ncp-disable") && !p[1])