[Openvpn-devel,v2,10/10] Add a note that ncp-ciphers is replaced by data-ciphers

Message ID 20200724142557.25204-1-arne@rfc2549.org
State Accepted
Headers show
Series None | expand

Commit Message

Arne Schwabe July 24, 2020, 4:25 a.m. UTC
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>
---
 src/openvpn/options.c | 5 +++++
 1 file changed, 5 insertions(+)

2.26.2

Comments

Gert Doering July 26, 2020, 10:19 p.m. UTC | #1
Acked-by: Gert Doering <gert@greenie.muc.de>

From the discussions and mails in the 8/9 thread, I understand that
this is acceptable to everyone involved.  So, move forward with 
improving our common project!

Code looks good, and compiles.  Even tested it.  Works.

Your patch has been applied to the master branch.

commit 342f9b78f107530f67581d6247d38af0792e4243
Author: Arne Schwabe
Date:   Fri Jul 24 16:25:57 2020 +0200

     Add a note that ncp-ciphers is replaced by data-ciphers

     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>


--
kind regards,

Gert Doering

Patch

diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index 5beaba0f..2cff9473 100644
--- a/src/openvpn/options.c
+++ b/src/openvpn/options.c
@@ -7939,7 +7939,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])
--