FRP: Present a warning on deprecated features during start-up
PATCH 1/1 FRP: Present a warning on deprecated features during start-up
From: David Sommerseth <[email protected]...>
Added a new function, warn_deprecated_features(), which is located in deprecated.[ch]. All deprecated features should present a warning here. This function will be called during start-up and will show all warnings after the OpenVPN title string.
Included a deprecated feature warning for the resolv-random feature.
--- Makefile.am | 3 ++- deprecated.c | 36 ++++++++++++++++++++++++++++++++++++ deprecated.h | 30 ++++++++++++++++++++++++++++++ openvpn.c | 5 +++++ 4 files changed, 73 insertions(+), 1 deletions(-) create mode 100644 deprecated.c create mode 100644 deprecated.h
Makefile.am +2 -1
@@ -138,7 +138,8 @@ openvpn_SOURCES = \ thread.c thread.h \ tun.c tun.h \ win32.h win32.c \ - cryptoapi.h cryptoapi.c + cryptoapi.h cryptoapi.c \ + deprecated.h deprecated.c dist-hook:
deprecated.c new file +36 -0
@@ -0,0 +1,36 @@ +/* +* OpenVPN -- An application to securely tunnel IP networks +* over a single TCP/UDP port, with support for SSL/TLS-based +* session authentication and key exchange, +* packet encryption, packet authentication, and +* packet compression. +* +* Copyright (C) 2010 David Sommerseth <[email protected]...> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 +* as published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program (see the file COPYING included with this +* distribution); if not, write to the Free Software Foundation, Inc., +* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "syshead.h" +#include "error.h" + + +inline void +warn_deprecated_features (void ) +{ +#ifdef DEPRECATED_RANDOM_RESOLV +msg (M_INFO ,"[DEPRECATED FEATURE ENABLED: random-resolv] Resolving hostnames will use randomisation if more than one IP address is found" ); +#endif +} +
deprecated.h new file +30 -0
@@ -0,0 +1,30 @@ +/* +* OpenVPN -- An application to securely tunnel IP networks +* over a single TCP/UDP port, with support for SSL/TLS-based +* session authentication and key exchange, +* packet encryption, packet authentication, and +* packet compression. +* +* Copyright (C) 2010 David Sommerseth <[email protected]...> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 +* as published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program (see the file COPYING included with this +* distribution); if not, write to the Free Software Foundation, Inc., +* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef DEPRECATED_H +#define DEPRECATED_H + +inline void warn_deprecated_features (void ); + +#endif
openvpn.c +5 -0
@@ -28,6 +28,7 @@#include "forward.h" #include "multi.h" #include "win32.h" +#include "deprecated.h" #include "memdbg.h"
@@ -181,6 +182,10 @@ main (int argc, char *argv[])/* print version number */ msg (M_INFO ,"%s" , title_string); +/* All deprecated features should present a warning +in this function, found in deprecated.c */ +warn_deprecated_features (); +/* misc stuff */ pre_setup (&c.options);
Signature · 1 line
1.6.6
Hi,
Quoted 10 lines · David Sommerseth
From: David Sommerseth <[email protected]...>
Added a new function,
warn_deprecated_features(), which is located in deprecated.[ch]. All deprecated features should present a warning here. This function will be called during start-up and will show all warnings after the OpenVPN title string.Included a deprecated feature warning for the resolv-random feature.
Signed-off-by David Sommerseth <[email protected]...>
ACK!
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...