]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Added "setenv GENERIC_CONFIG" directive, for generic configs
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Fri, 16 Oct 2009 16:31:01 +0000 (16:31 +0000)
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Fri, 16 Oct 2009 16:31:01 +0000 (16:31 +0000)
that cannot directly be used as a config file.  The directive
will simply cause OpenVPN to exit with an error if a generic
config file is used.

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5077 e7ae566f-a301-0410-adde-c780ea21d3b5

options.c

index acbb036609c6d93d98a0e349145296ced124aded..183c21a848a235bc023a1c1b728407094d1c27a8 100644 (file)
--- a/options.c
+++ b/options.c
@@ -4468,6 +4468,11 @@ add_option (struct options *options,
        {
          options->sockflags |= SF_HOST_RANDOMIZE;
        }
+      else if (streq (p[1], "GENERIC_CONFIG"))
+       {
+         msg (msglevel, "this is a generic configuration and cannot directly be used");
+         goto err;
+       }
 #if P2MP
       else if (streq (p[1], "SERVER_POLL_TIMEOUT") && p[2])
        {