]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Push an IPv6 CIDR mask used by the server, not the pool's size
authorJosh Cepek <josh.cepek@usa.net>
Mon, 18 Aug 2014 10:51:01 +0000 (05:51 -0500)
committerGert Doering <gert@greenie.muc.de>
Wed, 18 May 2016 06:25:42 +0000 (08:25 +0200)
Correctly handle CIDR masks when pushing clients addressing from an IPv6
pool. This change ignores the incorrectly used `bits` argument to the
--ifconfig-ipv6-pool option.

The code to save any provided CIDR mask after the pool IP is left in;
this may someday become useful when we move to allow IPv6 pools without
relying on an IPv4 pool assignment.

Signed-off-by: Josh Cepek <josh.cepek@usa.net>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <53F1DA95.7020701@usa.net>
URL: http://article.gmane.org/gmane.network.openvpn.devel/8990
Signed-off-by: Gert Doering <gert@greenie.muc.de>
doc/openvpn.8
src/openvpn/multi.c

index 8d1b062234700320c9f912578a2b9020f83e8521..e1dd7cde3cb088480a9657f801a98ed96a6593ea 100644 (file)
@@ -5799,10 +5799,7 @@ Is only accepted if ``\-\-mode server'' or ``\-\-server'' is set.
 Specify an IPv6 address pool for dynamic assignment to clients.  The
 pool starts at
 .B ipv6addr
-and increments by +1 for every new client (linear mode).  The
-.B /bits
-setting controls the size of the pool.  Due to implementation details,
-the pool size must be between /64 and /112.
+and matches the offset determined from the start of the IPv4 pool.
 .TP
 .B \-\-ifconfig\-ipv6\-push ipv6addr/bits ipv6remote
 for ccd/ per-client static IPv6 interface configuration, see
index 6e6d45772bf936de646adb48b71aff1e0d3be3c3..4c43fcc5b93f3848f62f183401da36b9c058a25e 100644 (file)
@@ -1431,10 +1431,10 @@ multi_select_virtual_addr (struct multi_context *m, struct multi_instance *mi)
          if ( mi->context.options.ifconfig_ipv6_pool_defined )
            {
              mi->context.c2.push_ifconfig_ipv6_local = remote_ipv6;
-             mi->context.c2.push_ifconfig_ipv6_remote = 
+             mi->context.c2.push_ifconfig_ipv6_remote =
                    mi->context.c1.tuntap->local_ipv6;
-             mi->context.c2.push_ifconfig_ipv6_netbits = 
-                   mi->context.options.ifconfig_ipv6_pool_netbits;
+             mi->context.c2.push_ifconfig_ipv6_netbits =
+                   mi->context.options.ifconfig_ipv6_netbits;
              mi->context.c2.push_ifconfig_ipv6_defined = true;
            }
        }