]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Move block for "stale-routes-check" config inside #ifdef P2MP_SERVER block
authorGert Doering <gert@greenie.muc.de>
Sat, 8 Oct 2011 10:26:52 +0000 (12:26 +0200)
committerDavid Sommerseth <dazo@users.sourceforge.net>
Sun, 9 Oct 2011 11:33:17 +0000 (13:33 +0200)
options->stale_routes_ageing_time etc.  are not defined otherwise, and
compilation fails.

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Davide Guerri <d.guerri@caspur.it>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
options.c

index 68255a5a14a34cc95f052ca7a7b1e5c54e880711..c1a0ba60bba0defc9b8cf149827a4ea1fbd7ea55 100644 (file)
--- a/options.c
+++ b/options.c
@@ -4950,25 +4950,6 @@ add_option (struct options *options,
        }
       options->max_routes = max_routes;
     }
-  else if (streq (p[0], "stale-routes-check") && p[1])
-    {
-      int ageing_time, check_interval;
-
-      VERIFY_PERMISSION (OPT_P_GENERAL);
-      ageing_time = atoi (p[1]);
-      if (p[2])
-        check_interval = atoi (p[2]);
-      else
-        check_interval = ageing_time;
-
-      if (ageing_time < 1 || check_interval < 1)
-        {
-        msg (msglevel, "--stale-routes-check aging time and check interval must be >= 1");
-        goto err;
-        }
-      options->stale_routes_ageing_time  = ageing_time;
-      options->stale_routes_check_interval = check_interval;
-    }
   else if (streq (p[0], "route-gateway") && p[1])
     {
       VERIFY_PERMISSION (OPT_P_ROUTE_EXTRAS);
@@ -5598,6 +5579,25 @@ add_option (struct options *options,
       VERIFY_PERMISSION (OPT_P_GENERAL);
       options->server_flags |= SF_TCP_NODELAY_HELPER;
     }
+  else if (streq (p[0], "stale-routes-check") && p[1])
+    {
+      int ageing_time, check_interval;
+
+      VERIFY_PERMISSION (OPT_P_GENERAL);
+      ageing_time = atoi (p[1]);
+      if (p[2])
+        check_interval = atoi (p[2]);
+      else
+        check_interval = ageing_time;
+
+      if (ageing_time < 1 || check_interval < 1)
+        {
+        msg (msglevel, "--stale-routes-check aging time and check interval must be >= 1");
+        goto err;
+        }
+      options->stale_routes_ageing_time  = ageing_time;
+      options->stale_routes_check_interval = check_interval;
+    }
 #endif /* P2MP_SERVER */
 
   else if (streq (p[0], "client"))