For ``--dev tun`` execute as:
::
- cmd tun_dev tun_mtu link_mtu ifconfig_local_ip ifconfig_remote_ip [init | restart]
+ cmd tun_dev tun_mtu 0 ifconfig_local_ip ifconfig_remote_ip [init | restart]
For ``--dev tap`` execute as:
::
- cmd tap_dev tap_mtu link_mtu ifconfig_local_ip ifconfig_netmask [init | restart]
+ cmd tap_dev tap_mtu 0 ifconfig_local_ip ifconfig_netmask [init | restart]
See the `Environmental Variables`_ section below for additional
- parameters passed as environmental variables.
+ parameters passed as environmental variables. The ``0`` argument
+ used to be ``link_mtu`` which is no longer passed to scripts - to
+ keep the argument order, it was replaced with ``0``.
Note that if ``cmd`` includes arguments, all OpenVPN-generated arguments
will be appended to them to build an argument list with which the
``--client-connect`` and ``--client-disconnect`` scripts.
:code:`link_mtu`
- The maximum packet size (not including the IP header) of tunnel data in
- UDP tunnel transport mode. Set prior to ``--up`` or ``--down`` script
- execution.
+ No longer passed to scripts since OpenVPN 2.6.0. Used to be the
+ maximum packet size (not including the IP header) of tunnel data in
+ UDP tunnel transport mode.
:code:`local`
The ``--local`` parameter. Set on program initiation and reset on
#endif
const char *dev_type,
int tun_mtu,
- int link_mtu,
const char *ifconfig_local,
const char *ifconfig_remote,
const char *context,
}
setenv_str(es, "script_context", context);
setenv_int(es, "tun_mtu", tun_mtu);
- setenv_int(es, "link_mtu", link_mtu);
setenv_str(es, "dev", arg);
if (dev_type)
{
struct argv argv = argv_new();
ASSERT(arg);
argv_printf(&argv,
- "%s %d %d %s %s %s",
- arg,
- tun_mtu, link_mtu,
- ifconfig_local, ifconfig_remote,
- context);
+ "%s %d 0 %s %s %s",
+ arg, tun_mtu, ifconfig_local, ifconfig_remote, context);
if (plugin_call(plugins, plugin_type, &argv, NULL, es) != OPENVPN_PLUGIN_FUNC_SUCCESS)
{
ASSERT(arg);
setenv_str(es, "script_type", script_type);
argv_parse_cmd(&argv, command);
- argv_printf_cat(&argv, "%s %d %d %s %s %s", arg, tun_mtu, link_mtu,
+ argv_printf_cat(&argv, "%s %d 0 %s %s %s", arg, tun_mtu,
ifconfig_local, ifconfig_remote, context);
argv_msg(M_INFO, &argv);
openvpn_run_script(&argv, es, S_FATAL, "--up/--down");
#endif
dev_type_string(c->options.dev, c->options.dev_type),
TUN_MTU_SIZE(&c->c2.frame),
- EXPANDED_SIZE(&c->c2.frame),
print_in_addr_t(c->c1.tuntap->local, IA_EMPTY_IF_UNDEF, &gc),
print_in_addr_t(c->c1.tuntap->remote_netmask, IA_EMPTY_IF_UNDEF, &gc),
"init",
#endif
dev_type_string(c->options.dev, c->options.dev_type),
TUN_MTU_SIZE(&c->c2.frame),
- EXPANDED_SIZE(&c->c2.frame),
print_in_addr_t(c->c1.tuntap->local, IA_EMPTY_IF_UNDEF, &gc),
print_in_addr_t(c->c1.tuntap->remote_netmask, IA_EMPTY_IF_UNDEF, &gc),
"restart",
#endif
NULL,
TUN_MTU_SIZE(&c->c2.frame),
- EXPANDED_SIZE(&c->c2.frame),
print_in_addr_t(local, IA_EMPTY_IF_UNDEF, &gc),
print_in_addr_t(remote_netmask, IA_EMPTY_IF_UNDEF, &gc),
"init",
#endif
NULL,
TUN_MTU_SIZE(&c->c2.frame),
- EXPANDED_SIZE(&c->c2.frame),
print_in_addr_t(local, IA_EMPTY_IF_UNDEF, &gc),
print_in_addr_t(remote_netmask, IA_EMPTY_IF_UNDEF, &gc),
"init",
#endif
NULL,
TUN_MTU_SIZE(&c->c2.frame),
- EXPANDED_SIZE(&c->c2.frame),
print_in_addr_t(local, IA_EMPTY_IF_UNDEF, &gc),
print_in_addr_t(remote_netmask, IA_EMPTY_IF_UNDEF, &gc),
"restart",