aboutsummaryrefslogtreecommitdiff
path: root/init.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2006-04-13 20:40:39 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2006-04-13 20:40:39 +0000
commit40ac3d7ac1cb29bf5d482e162c102c56a5e2e5e6 (patch)
treefb5ea6dc09883fcbc031da30ce5544ddd9a41822 /init.c
parentVersion number increment. (diff)
downloadopenvpn-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 'init.c')
-rw-r--r--init.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/init.c b/init.c
index c0eeb1a..0bc5219 100644
--- a/init.c
+++ b/init.c
@@ -634,15 +634,19 @@ do_init_route_list (const struct options *options,
{
const char *gw = NULL;
int dev = dev_type_enum (options->dev, options->dev_type);
+ int metric = 0;
if (dev == DEV_TYPE_TUN && (options->topology == TOP_NET30 || options->topology == TOP_P2P))
gw = options->ifconfig_remote_netmask;
if (options->route_default_gateway)
gw = options->route_default_gateway;
+ if (options->route_default_metric)
+ metric = options->route_default_metric;
if (!init_route_list (route_list,
options->routes,
gw,
+ metric,
link_socket_current_remote (link_socket_info),
es))
{