summaryrefslogtreecommitdiffstats
path: root/src/openvpn/init.c
diff options
context:
space:
mode:
authorJan Just Keijser <janjust@nikhef.nl>2015-05-20 04:33:20 +0200
committerGert Doering <gert@greenie.muc.de>2015-05-23 13:18:00 +0200
commitdb950be85d37eab40d8fffe0bc2060059f8a7e10 (patch)
tree9b55d76cd2b73dbbb353b9eee6da27ead49e50aa /src/openvpn/init.c
parentd3eacb2d6ebb8a42506343c54e00c72252d683f8 (diff)
downloadopenvpn-db950be85d37eab40d8fffe0bc2060059f8a7e10.tar.gz
openvpn-db950be85d37eab40d8fffe0bc2060059f8a7e10.tar.xz
openvpn-db950be85d37eab40d8fffe0bc2060059f8a7e10.zip
include ifconfig_ environment variables in --up-restart env set
here's my patch for bug #93: missing ifconfig_* env vars after up-restart. Tested with both IPv4, IPv6, topology subnet and topology net30 Document differences between --up-restart and --up in openvpn.8 See trac #93 and the discussion starting with <555BF270.3090706@nikhef.nl> on the openvpn-devel mailing list. fix trac #93 Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <555BF270.3090706@nikhef.nl> URL: http://article.gmane.org/gmane.network.openvpn.devel/9705 Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'src/openvpn/init.c')
-rw-r--r--src/openvpn/init.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/openvpn/init.c b/src/openvpn/init.c
index 42cb3e2..769ab9b 100644
--- a/src/openvpn/init.c
+++ b/src/openvpn/init.c
@@ -1486,6 +1486,9 @@ do_open_tun (struct context *c)
msg (M_INFO, "Preserving previous TUN/TAP instance: %s",
c->c1.tuntap->actual_name);
+ /* explicitly set the ifconfig_* env vars */
+ do_ifconfig_setenv(c->c1.tuntap, c->c2.es);
+
/* run the up script if user specified --up-restart */
if (c->options.up_restart)
run_up_down (c->options.up_script,