Skip to content

Commit d4df0a3

Browse files
flichtenheldcron2
authored andcommitted
options: Remove some verbose error messages for options deprecated in 2.4
It has been a long time since 2.3. So move this from the code to the documentation. Includes some minimal drive-by fixes. Change-Id: I59995bf0fd6bc48a738a94e41141ed37d8d637ba Signed-off-by: Frank Lichtenheld <[email protected]> Acked-by: Gert Doering <[email protected]> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1427 Message-Id: <[email protected]> URL: https://www.mail-archive.com/[email protected]/msg34972.html Signed-off-by: Gert Doering <[email protected]>
1 parent 2ab3e87 commit d4df0a3

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed

doc/man-sections/unsupported-options.rst

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,16 @@ Options listed in this section have been removed from OpenVPN and are no
66
longer supported
77

88
--client-cert-not-required
9-
Removed in OpenVPN 2.5. This should be replaxed with
9+
Removed in OpenVPN 2.5. This should be replaced with
1010
``--verify-client-cert none``.
1111

12+
--http-proxy-retry
13+
Removed in OpenVPN 2.4. All retries are controlled by ``--max-connect-retry``.
14+
15+
--http-proxy-timeout
16+
Removed in OpenVPN 2.4. Connection timeout is controlled by
17+
``--connect-timeout``.
18+
1219
--ifconfig-pool-linear
1320
Removed in OpenVPN 2.5. This should be replaced with ``--topology p2p``.
1421

@@ -21,6 +28,9 @@ longer supported
2128
Removed in OpenVPN 2.6. The built-in packet filtering (pf) functionality
2229
has been removed.
2330

31+
--max-routes
32+
Removed in OpenVPN 2.4. The limit was removed.
33+
2434
--ncp-disable
2535
Removed in OpenVPN 2.6. This option mainly served a role as debug option
2636
when NCP was first introduced. It should no longer be necessary.
@@ -50,6 +60,9 @@ longer supported
5060
Removed in OpenVPN 2.7. This option does not make sense anymore as option
5161
strings may not match due to the introduction of parameters negotiation.
5262

63+
--socks-proxy-retry
64+
Removed in OpenVPN 2.4. All retries are controlled by ``--max-connect-retry``.
65+
5366
--windows-driver
5467
Removed in OpenVPN 2.7. OpenVPN will always use ovpn-dco as the default
5568
driver on Windows. It will fall back to tap-windows6 if options are used

src/openvpn/options.c

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6699,19 +6699,10 @@ add_option(struct options *options, char *p[], bool is_inline, const char *file,
66996699
ho->auth_file_up = p[1];
67006700
ho->inline_creds = is_inline;
67016701
}
6702-
else if (streq(p[0], "http-proxy-retry") || streq(p[0], "socks-proxy-retry"))
6702+
else if (streq(p[0], "http-proxy-retry") || streq(p[0], "socks-proxy-retry") || streq(p[0], "http-proxy-timeout"))
67036703
{
67046704
VERIFY_PERMISSION(OPT_P_GENERAL | OPT_P_CONNECTION);
6705-
msg(M_WARN, "DEPRECATED OPTION: http-proxy-retry and socks-proxy-retry: "
6706-
"In OpenVPN 2.4 proxy connection retries are handled like regular connections. "
6707-
"Use connect-retry-max 1 to get a similar behavior as before.");
6708-
}
6709-
else if (streq(p[0], "http-proxy-timeout") && p[1] && !p[2])
6710-
{
6711-
VERIFY_PERMISSION(OPT_P_GENERAL | OPT_P_CONNECTION);
6712-
msg(M_WARN,
6713-
"DEPRECATED OPTION: http-proxy-timeout: In OpenVPN 2.4 the timeout until a connection to a "
6714-
"server is established is managed with a single timeout set by connect-timeout");
6705+
msg(M_WARN, "DEPRECATED OPTION: %s option ignored.", p[0]);
67156706
}
67166707
else if (streq(p[0], "http-proxy-option") && p[1] && !p[4])
67176708
{
@@ -6826,7 +6817,7 @@ add_option(struct options *options, char *p[], bool is_inline, const char *file,
68266817
else if (streq(p[0], "persist-key") && !p[1])
68276818
{
68286819
VERIFY_PERMISSION(OPT_P_PERSIST);
6829-
msg(M_WARN, "DEPRECATED: --persist-key option ignored. "
6820+
msg(M_WARN, "DEPRECATED OPTION: --persist-key option ignored. "
68306821
"Keys are now always persisted across restarts. ");
68316822
}
68326823
else if (streq(p[0], "persist-local-ip") && !p[1])
@@ -6875,10 +6866,7 @@ add_option(struct options *options, char *p[], bool is_inline, const char *file,
68756866
}
68766867
else if (streq(p[0], "max-routes") && !p[2])
68776868
{
6878-
msg(M_WARN, "DEPRECATED OPTION: --max-routes option ignored. "
6879-
"The number of routes is unlimited as of OpenVPN 2.4. "
6880-
"This option will be removed in a future version, "
6881-
"please remove it from your configuration.");
6869+
msg(M_WARN, "DEPRECATED OPTION: --max-routes option ignored.");
68826870
}
68836871
else if (streq(p[0], "route-gateway") && p[1] && !p[2])
68846872
{

0 commit comments

Comments
 (0)