summaryrefslogtreecommitdiff
path: root/src/openvpn/multi.c
diff options
context:
space:
mode:
authorAlberto Gonzalez Iniesta <agi@inittab.org>2016-01-20 12:01:07 +0100
committerAlberto Gonzalez Iniesta <agi@inittab.org>2016-01-20 12:01:07 +0100
commit9653b1bffea4e96c1eb7c1814e8bed21fea62321 (patch)
tree485f02f91b424955a45c1cc12876c31d3d957f9b /src/openvpn/multi.c
parent41ffafc126abd9af67061f4931b7614f3cb898b0 (diff)
Imported Upstream version 2.3.10upstream/2.3.10
Diffstat (limited to 'src/openvpn/multi.c')
-rw-r--r--src/openvpn/multi.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c
index 374950e..577c5d3 100644
--- a/src/openvpn/multi.c
+++ b/src/openvpn/multi.c
@@ -1426,10 +1426,24 @@ multi_set_virtual_addr_env (struct multi_context *m, struct multi_instance *mi)
}
}
- /* TODO: I'm not exactly sure what these environment variables are
- * used for, but if we have them for IPv4, we should also have
- * them for IPv6, no?
- */
+ setenv_del (mi->context.c2.es, "ifconfig_pool_local_ip6");
+ setenv_del (mi->context.c2.es, "ifconfig_pool_remote_ip6");
+ setenv_del (mi->context.c2.es, "ifconfig_pool_ip6_netbits");
+
+ if (mi->context.c1.tuntap->ipv6 && mi->context.c2.push_ifconfig_ipv6_defined)
+ {
+ setenv_in6_addr (mi->context.c2.es,
+ "ifconfig_pool_remote",
+ &mi->context.c2.push_ifconfig_ipv6_local,
+ SA_SET_IF_NONZERO);
+ setenv_in6_addr (mi->context.c2.es,
+ "ifconfig_pool_local",
+ &mi->context.c2.push_ifconfig_ipv6_remote,
+ SA_SET_IF_NONZERO);
+ setenv_int (mi->context.c2.es,
+ "ifconfig_pool_ip6_netbits",
+ mi->context.c2.push_ifconfig_ipv6_netbits);
+ }
}
/*
@@ -1780,6 +1794,7 @@ multi_connection_established (struct multi_context *m, struct multi_instance *mi
{
msg (D_MULTI_ERRORS, "MULTI: client has been rejected due to 'disable' directive");
cc_succeeded = false;
+ cc_succeeded_count = 0;
}
if (cc_succeeded)