From 74d53c9bf986d835e1862aa3989fac186b5d76f3 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Mon, 17 Mar 2014 13:56:53 +0100 Subject: [PATCH] Introduce safety check for http proxy options Acked-by: Gert Doering Message-Id: <1395061013-1802-1-git-send-email-arne@rfc2549.org> URL: http://article.gmane.org/gmane.network.openvpn.devel/8353 Signed-off-by: Gert Doering (cherry picked from commit 087b510365d9aad8f656a8fb0cc07d51511be9d0) --- src/openvpn/options.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 34e44ec5f..7741dbf84 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -1979,6 +1979,8 @@ options_postprocess_verify_ce (const struct options *options, const struct conne #ifdef ENABLE_HTTP_PROXY if ((ce->http_proxy_options) && ce->proto != PROTO_TCPv4_CLIENT) msg (M_USAGE, "--http-proxy MUST be used in TCP Client mode (i.e. --proto tcp-client)"); + if ((ce->http_proxy_options) && !ce->http_proxy_options->server) + msg (M_USAGE, "--http-proxy not specified but other http proxy options present"); #endif #if defined(ENABLE_HTTP_PROXY) && defined(ENABLE_SOCKS) -- 2.47.2