]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Repair --inetd
authorGert Doering <gert@greenie.muc.de>
Fri, 24 Jul 2020 18:13:24 +0000 (20:13 +0200)
committerGert Doering <gert@greenie.muc.de>
Sat, 25 Jul 2020 08:03:50 +0000 (10:03 +0200)
commit 25a422cc60 deprecated --inetd, which is still something we want.

Unlike all "usual" deprecated option warnings, we cannot print this at
option parsing time, because we need logging to be set up first - otherwise
the deprecation warning is sent via the socket (on stdin/stdout)
towards the connecting client, totally breaking this mode.

(Which is why we want to deprecate it: too special even for us)

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

index 1a915e27a47e7e053c49482b7b2da2966d295598..a8a9bb974173fafc89137822037b2d5418f1801c 100644 (file)
@@ -2050,6 +2050,11 @@ options_postprocess_verify_ce(const struct options *options, const struct connec
         msg(M_USAGE, "--inetd nowait only makes sense in --dev tap mode");
     }
 
+    if (options->inetd)
+    {
+        msg(M_WARN, "DEPRECATED OPTION: --inetd mode is deprecated "
+                    "and will be removed in OpenVPN 2.6");
+    }
 
     if (options->lladdr && dev != DEV_TYPE_TAP)
     {
@@ -5802,8 +5807,6 @@ add_option(struct options *options,
     }
     else if (streq(p[0], "inetd") && !p[3])
     {
-        msg(M_WARN, "DEPRECATED OPTION: --inetd mode is deprecated "
-                    "and will be removed in OpenVPN 2.6");
         VERIFY_PERMISSION(OPT_P_GENERAL);
         if (!options->inetd)
         {