ocserv: simplify IPv6 network setting
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 31 Oct 2015 11:21:16 +0000 (12:21 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 28 Nov 2015 21:29:34 +0000 (22:29 +0100)
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
net/ocserv/files/ocserv.conf.template
net/ocserv/files/ocserv.init

index dce96d832598cd49c7b59ee51dc1b64573132718..84210123471a517969b312da5e7a818d5a8275a4 100644 (file)
@@ -268,7 +268,6 @@ ipv4-netmask = |NETMASK|
 
 # The IPv6 subnet that leases will be given from.
 |ENABLE_IPV6|ipv6-network = |IPV6ADDR|
-|ENABLE_IPV6|ipv6-prefix = |IPV6PREFIX|
 
 # The domains over which the provided DNS should be used. Use
 # multiple lines for multiple domains.
index d4d014dd8af69f2c873978767ca8c21db4e822c4..8fe5e9af968368bad29327c460fe4aef2371187a 100644 (file)
@@ -31,9 +31,6 @@ setup_config() {
        test -z $default_domain && enable_default_domain=""
        test -z $ip6addr && enable_ipv6="#"
 
-       ipv6_addr=`echo $ip6addr|cut -d '/' -f 1`
-       ipv6_prefix=`echo $ip6addr|cut -d '/' -f 2`
-
        test $auth = "plain" && authsuffix="\[passwd=/var/etc/ocpasswd\]"
 
        dyndns="false"
@@ -55,8 +52,7 @@ setup_config() {
            -e "s/|COMPRESSION|/$enable_compression/g" \
            -e "s/|IPV4ADDR|/$ipaddr/g" \
            -e "s/|NETMASK|/$netmask/g" \
-           -e "s/|IPV6ADDR|/$ipv6_addr/g" \
-           -e "s/|IPV6PREFIX|/$ipv6_prefix/g" \
+           -e "s#|IPV6ADDR|#$ip6addr#g" \
            -e "s/|ENABLE_IPV6|/$enable_ipv6/g" \
            /etc/ocserv/ocserv.conf.template > /var/etc/ocserv.conf
 }