IPv6 routes across ``tap'' devices, and if missing, the ``ipv6remote''
field from
.B \-\-ifconfig\-ipv6
+or
+.B \-\-route\-ipv6\-gateway
is used.
.TP
+.B \-\-route\-ipv6\-gateway gw
+Specify a default gateway
+.B gw
+for use with
+.B \-\-route\-ipv6.
+.TP
.B \-\-server\-ipv6 ipv6addr/bits
convenience\-function to enable a number of IPv6 related options at
once, namely
int metric = -1; /* no metric set */
gw = options->ifconfig_ipv6_remote; /* default GW = remote end */
-#if 0 /* not yet done for IPv6 - TODO!*/
- if (options->route_ipv6_default_gateway) /* override? */
+ if (options->route_ipv6_default_gateway)
{
gw = options->route_ipv6_default_gateway;
}
-#endif
if (options->route_default_metric)
{
"--route-ipv6 network/bits [gateway] [metric] :\n"
" Add IPv6 route to routing table after connection\n"
" is established. Multiple routes can be specified.\n"
- " gateway default: taken from 'remote' in --ifconfig-ipv6\n"
+ " gateway default: taken from --route-ipv6-gateway or 'remote'\n"
+ " in --ifconfig-ipv6\n"
"--route-gateway gw|'dhcp' : Specify a default gateway for use with --route.\n"
+ "--route-ipv6-gateway gw : Specify a default gateway for use with --route-ipv6.\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"
}
}
}
+ else if (streq(p[0], "route-ipv6-gateway") && p[1] && !p[2])
+ {
+ if (ipv6_addr_safe(p[1]))
+ {
+ options->route_ipv6_default_gateway = p[1];
+ }
+ else
+ {
+ msg(msglevel, "route-ipv6-gateway parm '%s' must be a valid address", p[1]);
+ goto err;
+ }
+ }
else if (streq(p[0], "route-metric") && p[1] && !p[2])
{
VERIFY_PERMISSION(OPT_P_ROUTE);
const char *route_script;
const char *route_predown_script;
const char *route_default_gateway;
+ const char *route_ipv6_default_gateway;
int route_default_metric;
bool route_noexec;
int route_delay;