diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2010-11-29 23:57:44 +0100 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2011-03-25 09:38:48 +0100 |
commit | a0a547a70d6f8e5cc444fe6b07020d874cca1418 (patch) | |
tree | f5752c51d8a62c25f492763ae8fa7edee71db49d /misc.h | |
parent | Misc fixes to r6708. (diff) | |
download | openvpn-a0a547a70d6f8e5cc444fe6b07020d874cca1418.tar.xz |
Provide 'dev_type' environment variable to plug-ins and script hooks
Normally OpenVPN is configured with --dev {tun,tap}, but it is also possible
to use --dev myvpn instead. In these situations, OpenVPN will request
--dev-type as well to be able to set up a tun or tap device properly.
The 'dev' environment variable will contain the value provided by --dev. In
those cases where the plug-in/script need to behave differently when using a tun
device versus using a tap device, there are no possibilities for it to know what
kind of device --dev myvpn would be.
This patch adds a 'dev_type' environment variable which contains a string of the
device type, either automatically discovered based on the --dev name, or set using
the --dev-type option.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Acked-by: James Yonan <james@openvpn.net>
Diffstat (limited to '')
-rw-r--r-- | misc.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -93,6 +93,7 @@ void run_up_down (const char *command, const struct plugin_list *plugins, int plugin_type, const char *arg, + const char *dev_type, int tun_mtu, int link_mtu, const char *ifconfig_local, |