A set of variables which define each IPv6 route to be added, and are
set prior to **--up** script execution.
- ``parm`` will be one of :code:`network` or :code:`gateway`
- (:code:`netmask` is contained as :code:`/nnn` in the
- ``route_ipv6_network_{n}``, unlike IPv4 where it is passed in a
- separate environment variable).
+ ``parm`` will be one of :code:`network`, :code:`gateway` or
+ :code:`metric`. ``route_ipv6_network_{n}`` contains :code:`netmask`
+ as :code:`/nnn`, unlike IPv4 where it is passed in a separate environment
+ variable.
``n`` is the OpenVPN route number, starting from 1.
buf_printf( &name2, "route_ipv6_gateway_%d", i );
setenv_str( es, BSTR(&name2), print_in6_addr( r6->gateway, 0, &gc ));
+
+ if (r6->flags & RT_METRIC_DEFINED)
+ {
+ struct buffer name3 = alloc_buf_gc( 256, &gc );
+ buf_printf( &name3, "route_ipv6_metric_%d", i) ;
+ setenv_int( es, BSTR(&name3), r6->metric);
+ }
}
gc_free(&gc);
}