diff --git a/doc/openvpn.8 b/doc/openvpn.8
index 3a58317..8b601f7 100644
a
|
b
|
and |
5867 | 5867 | scripts. |
5868 | 5868 | .\"********************************************************* |
5869 | 5869 | .TP |
| 5870 | .B ifconfig_ipv6_pool_remote_ip |
| 5871 | The remote |
| 5872 | virtual IPv6 address for the TUN/TAP tunnel taken from an |
| 5873 | .B \-\-ifconfig-ipv6-push |
| 5874 | directive if specified, or otherwise from |
| 5875 | the ifconfig pool (controlled by the |
| 5876 | .B \-\-ifconfig-ipv6-pool |
| 5877 | config file directive). |
| 5878 | This option is set on the server prior to execution |
| 5879 | of the |
| 5880 | .B \-\-client-connect |
| 5881 | and |
| 5882 | .B \-\-client-disconnect |
| 5883 | scripts. |
| 5884 | .\"********************************************************* |
| 5885 | .TP |
5870 | 5886 | .B link_mtu |
5871 | 5887 | The maximum packet size (not including the IP header) |
5872 | 5888 | of tunnel data in UDP tunnel transport mode. |
diff --git a/src/openvpn/manage.c b/src/openvpn/manage.c
index 9f44cd9..ce5b039 100644
a
|
b
|
env_filter_match (const char *env_str, const int env_filter_level) |
2416 | 2416 | "dev=", |
2417 | 2417 | "ifconfig_pool_remote_ip=", |
2418 | 2418 | "ifconfig_pool_netmask=", |
| 2419 | "ifconfig_ipv6_pool_remote_ip=", |
2419 | 2420 | "time_duration=", |
2420 | 2421 | "bytes_sent=", |
2421 | 2422 | "bytes_received=" |
diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c
index 2839b30..ced59e5 100644
a
|
b
|
multi_set_virtual_addr_env (struct multi_context *m, struct multi_instance *mi) |
1432 | 1432 | } |
1433 | 1433 | } |
1434 | 1434 | |
1435 | | /* TODO: I'm not exactly sure what these environment variables are |
1436 | | * used for, but if we have them for IPv4, we should also have |
1437 | | * them for IPv6, no? |
1438 | | */ |
| 1435 | setenv_del (mi->context.c2.es, "ifconfig_ipv6_pool_remote_ip"); |
| 1436 | |
| 1437 | if (mi->context.c2.push_ifconfig_ipv6_defined) |
| 1438 | { |
| 1439 | setenv_in6_addr_t (mi->context.c2.es, |
| 1440 | "ifconfig_ipv6_pool_remote_ip", |
| 1441 | &mi->context.c2.push_ifconfig_ipv6_local, |
| 1442 | SA_SET_IF_NONZERO); |
| 1443 | } |
| 1444 | |
1439 | 1445 | } |
1440 | 1446 | |
1441 | 1447 | /* |
diff --git a/src/openvpn/socket.c b/src/openvpn/socket.c
index ed4bc6f..fbb1c34 100644
a
|
b
|
setenv_sockaddr (struct env_set *es, const char *name_prefix, const struct openv |
2602 | 2602 | } |
2603 | 2603 | break; |
2604 | 2604 | case AF_INET6: |
2605 | | openvpn_snprintf (name_buf, sizeof (name_buf), "%s_ip6", name_prefix); |
| 2605 | if (flags & SA_IP_PORT) |
| 2606 | openvpn_snprintf (name_buf, sizeof (name_buf), "%s_ip6", name_prefix); |
| 2607 | else |
| 2608 | openvpn_snprintf (name_buf, sizeof (name_buf), "%s", name_prefix); |
2606 | 2609 | getnameinfo(&addr->addr.sa, sizeof (struct sockaddr_in6), |
2607 | 2610 | buf, sizeof(buf), NULL, 0, NI_NUMERICHOST); |
2608 | 2611 | setenv_str (es, name_buf, buf); |
… |
… |
setenv_in_addr_t (struct env_set *es, const char *name_prefix, in_addr_t addr, c |
2630 | 2633 | } |
2631 | 2634 | |
2632 | 2635 | void |
| 2636 | setenv_in6_addr_t (struct env_set *es, const char *name_prefix, struct in6_addr *addr, const bool flags) |
| 2637 | { |
| 2638 | if ( memcmp(addr, &in6addr_any, sizeof(*addr)) != 0 || !(flags & SA_SET_IF_NONZERO)) |
| 2639 | { |
| 2640 | struct openvpn_sockaddr si; |
| 2641 | CLEAR (si); |
| 2642 | si.addr.in6.sin6_family = AF_INET6; |
| 2643 | si.addr.in6.sin6_addr = *addr; |
| 2644 | setenv_sockaddr (es, name_prefix, &si, flags); |
| 2645 | } |
| 2646 | } |
| 2647 | |
| 2648 | void |
2633 | 2649 | setenv_link_socket_actual (struct env_set *es, |
2634 | 2650 | const char *name_prefix, |
2635 | 2651 | const struct link_socket_actual *act, |
diff --git a/src/openvpn/socket.h b/src/openvpn/socket.h
index bffa039..c31bce9 100644
a
|
b
|
void setenv_in_addr_t (struct env_set *es, |
420 | 420 | in_addr_t addr, |
421 | 421 | const unsigned int flags); |
422 | 422 | |
| 423 | void setenv_in6_addr_t (struct env_set *es, |
| 424 | const char *name_prefix, |
| 425 | struct in6_addr *addr, |
| 426 | const bool flags); |
| 427 | |
423 | 428 | void setenv_link_socket_actual (struct env_set *es, |
424 | 429 | const char *name_prefix, |
425 | 430 | const struct link_socket_actual *act, |