summaryrefslogtreecommitdiff
path: root/src/openvpn/multi.c
diff options
context:
space:
mode:
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)