Message ID | 20200530000600.1680-4-a@unstable.cc |
---|---|
State | Accepted |
Headers | show |
Series | Allow IPv6-only tunnels | expand |
Acked-by: Gert Doering <gert@greenie.muc.de> Stared-at-code and tested on the t_server setup. Sufficiently trivial change :-) - but also all the other code parts that assume "if you do --server-ipv6, you must have done --server as well!!" have been adjusted in previous patches (ipv6-only ifconfig, ipv6-only pools). Your patch has been applied to the master branch. commit 7d65aad8973fa85a007a3de8907b9cbced20b2b4 Author: Antonio Quartulli Date: Sat May 30 02:05:56 2020 +0200 allow usage of --server-ipv6 even when no --server is specified Signed-off-by: Antonio Quartulli <antonio@openvpn.net> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <20200530000600.1680-4-a@unstable.cc> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg19949.html Signed-off-by: Gert Doering <gert@greenie.muc.de> -- kind regards, Gert Doering
diff --git a/src/openvpn/helper.c b/src/openvpn/helper.c index 34cfa6bd..277e6972 100644 --- a/src/openvpn/helper.c +++ b/src/openvpn/helper.c @@ -174,10 +174,11 @@ helper_client_server(struct options *o) */ if (o->server_ipv6_defined) { - if (!o->server_defined) + if (o->client) { - msg(M_USAGE, "--server-ipv6 must be used together with --server"); + msg(M_USAGE, "--server-ipv6 and --client cannot be used together"); } + if (o->server_flags & SF_NOPOOL) { msg( M_USAGE, "--server-ipv6 is incompatible with 'nopool' option" ); @@ -187,6 +188,9 @@ helper_client_server(struct options *o) msg( M_USAGE, "--server-ipv6 already defines an ifconfig-ipv6-pool, so you can't also specify --ifconfig-pool explicitly"); } + o->mode = MODE_SERVER; + o->tls_server = true; + /* local ifconfig is "base address + 1" and "+2" */ o->ifconfig_ipv6_local = print_in6_addr( add_in6_addr( o->server_network_ipv6, 1), 0, &o->gc );