]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Introduce safety check for http proxy options
authorArne Schwabe <arne@rfc2549.org>
Mon, 17 Mar 2014 12:56:53 +0000 (13:56 +0100)
committerGert Doering <gert@greenie.muc.de>
Mon, 17 Mar 2014 18:32:55 +0000 (19:32 +0100)
Acked-by: Gert Doering <gert@greenie.muc.de>
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 <gert@greenie.muc.de>
src/openvpn/options.c

index ef6170c9df08030116092af0526afb48e99cacfe..34cb64244c4ed6f51491310fab0d625dcbea6245 100644 (file)
@@ -1986,6 +1986,8 @@ options_postprocess_verify_ce (const struct options *options, const struct conne
 #ifdef ENABLE_HTTP_PROXY
   if ((ce->http_proxy_options) && ce->proto != PROTO_TCP_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)