]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fixed a bug introduced in r4436 (2.1_rc17) where using the
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Mon, 28 Sep 2009 07:50:30 +0000 (07:50 +0000)
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Mon, 28 Sep 2009 07:50:30 +0000 (07:50 +0000)
redirect-gateway option by itself, without any extra parameters,
would cause the option to be ignored.

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

options.c

index afd804f378c73e7b9c8ddb753581061bc907e7d8..acbb036609c6d93d98a0e349145296ced124aded 100644 (file)
--- a/options.c
+++ b/options.c
@@ -4434,10 +4434,10 @@ add_option (struct options *options,
       int j;
       VERIFY_PERMISSION (OPT_P_ROUTE);
       rol_check_alloc (options);
+      if (streq (p[0], "redirect-gateway"))
+       options->routes->flags |= RG_REROUTE_GW;
       for (j = 1; j < MAX_PARMS && p[j] != NULL; ++j)
        {
-         if (streq (p[0], "redirect-gateway"))
-           options->routes->flags |= RG_REROUTE_GW;
          if (streq (p[j], "local"))
            options->routes->flags |= RG_LOCAL;
          else if (streq (p[j], "autolocal"))