From 512cda46b0f65f388e24436cd28d44bdc90fe985 Mon Sep 17 00:00:00 2001 From: Gert Doering Date: Thu, 7 Jan 2010 14:51:40 +0100 Subject: Enable IPv6 Payload in OpenVPN p2mp tun server mode. 20100104-1 release. (cherry picked from commit ec9dce6387afd198881493bfebf13bb121e8a56b) --- push.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'push.c') diff --git a/push.c b/push.c index 08c7f99..e2a9182 100644 --- a/push.c +++ b/push.c @@ -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) -- cgit v1.2.3