diff options
author | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2006-04-13 20:40:39 +0000 |
---|---|---|
committer | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2006-04-13 20:40:39 +0000 |
commit | 40ac3d7ac1cb29bf5d482e162c102c56a5e2e5e6 (patch) | |
tree | fb5ea6dc09883fcbc031da30ce5544ddd9a41822 /options.c | |
parent | Version number increment. (diff) | |
download | openvpn-40ac3d7ac1cb29bf5d482e162c102c56a5e2e5e6.tar.xz |
Added --route-metric option to set a default route metric
for --route (Roy Marples).
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@1011 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'options.c')
-rw-r--r-- | options.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -166,6 +166,7 @@ static const char usage_message[] = " gateway default: taken from --route-gateway or --ifconfig\n" " Specify default by leaving blank or setting to \"nil\".\n" "--route-gateway gw : Specify a default gateway for use with --route.\n" + "--route-metric m : Specify a default metric for use with --route.\n" "--route-delay n [w] : Delay n seconds after connection initiation before\n" " adding routes (may be 0). If not specified, routes will\n" " be added immediately after tun/tap open. On Windows, wait\n" @@ -1175,6 +1176,7 @@ show_settings (const struct options *o) SHOW_STR (route_script); SHOW_STR (route_default_gateway); + SHOW_INT (route_default_metric); SHOW_BOOL (route_noexec); SHOW_INT (route_delay); SHOW_INT (route_delay_window); @@ -3938,6 +3940,11 @@ add_option (struct options *options, VERIFY_PERMISSION (OPT_P_ROUTE_EXTRAS); options->route_default_gateway = p[1]; } + else if (streq (p[0], "route-metric") && p[1]) + { + VERIFY_PERMISSION (OPT_P_ROUTE); + options->route_default_metric = positive_atoi (p[1]); + } else if (streq (p[0], "route-delay")) { VERIFY_PERMISSION (OPT_P_ROUTE_EXTRAS); |