diff options
author | Gert Doering <gert@greenie.muc.de> | 2010-01-07 14:51:40 +0100 |
---|---|---|
committer | Gert Doering <gert@greenie.muc.de> | 2011-04-24 17:22:34 +0200 |
commit | 512cda46b0f65f388e24436cd28d44bdc90fe985 (patch) | |
tree | d01771bcd3b7e6640a06235e270145626e6f504e /push.c | |
parent | 285252d1a189c331becde940d948d7ca1fe778fd (diff) | |
download | openvpn-512cda46b0f65f388e24436cd28d44bdc90fe985.tar.gz openvpn-512cda46b0f65f388e24436cd28d44bdc90fe985.tar.xz openvpn-512cda46b0f65f388e24436cd28d44bdc90fe985.zip |
Enable IPv6 Payload in OpenVPN p2mp tun server mode. 20100104-1 release.
(cherry picked from commit ec9dce6387afd198881493bfebf13bb121e8a56b)
Diffstat (limited to 'push.c')
-rw-r--r-- | push.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -191,6 +191,22 @@ send_push_reply (struct context *c) buf_printf (&buf, "%s", cmd); + if ( c->c2.push_ifconfig_ipv6_defined ) + { + /* IPv6 is put into buffer first, could be lengthy */ + /* TODO: push "/netbits" as well, to allow non-/64 subnet sizes + * (needs changes in options.c, options.h, and other places) + */ + buf_printf( &buf, ",ifconfig-ipv6 %s %s", + print_in6_addr( c->c2.push_ifconfig_ipv6_local, 0, &gc), + print_in6_addr( c->c2.push_ifconfig_ipv6_remote, 0, &gc) ); + if (BLEN (&buf) >= safe_cap) + { + msg (M_WARN, "--push ifconfig-ipv6 option is too long"); + goto fail; + } + } + while (e) { if (e->enable) |