From: bluhm Date: Sun, 16 Sep 2018 18:58:36 +0000 (+0000) Subject: If a prefix without length was specifed in the config file, then X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b2ae623dea1bd24a4482c938591c9fcc8bd5e897;p=openbsd If a prefix without length was specifed in the config file, then 128 was used. This does not make much sense for rad(8). Change the default prefixlen to 64. OK florian@ --- diff --git a/usr.sbin/rad/parse.y b/usr.sbin/rad/parse.y index 87acb6f3175..8aedd2a499c 100644 --- a/usr.sbin/rad/parse.y +++ b/usr.sbin/rad/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.9 2018/09/07 07:35:31 miko Exp $ */ +/* $OpenBSD: parse.y,v 1.10 2018/09/16 18:58:36 bluhm Exp $ */ /* * Copyright (c) 2018 Florian Obser @@ -268,6 +268,8 @@ ra_ifaceoptsl : NO AUTO PREFIX { free($2); YYERROR; } + if (prefixlen == 128 && strchr($2, '/') == NULL) + prefixlen = 64; mask_prefix(&addr, prefixlen); ra_prefix_conf = conf_get_ra_prefix(&addr, prefixlen); } ra_prefix_block { diff --git a/usr.sbin/rad/rad.conf.5 b/usr.sbin/rad/rad.conf.5 index be452c2f8b1..acf3c0e9997 100644 --- a/usr.sbin/rad/rad.conf.5 +++ b/usr.sbin/rad/rad.conf.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: rad.conf.5,v 1.11 2018/08/03 19:54:11 jmc Exp $ +.\" $OpenBSD: rad.conf.5,v 1.12 2018/09/16 18:58:36 bluhm Exp $ .\" .\" Copyright (c) 2018 Florian Obser .\" Copyright (c) 2005 Esben Norby @@ -18,7 +18,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: August 3 2018 $ +.Dd $Mdocdate: September 16 2018 $ .Dt RAD.CONF 5 .Os .Sh NAME @@ -126,6 +126,9 @@ The default is to discover prefixes to announce by inspecting the IPv6 addresses configured on an interface. This can be disabled with .Ic no auto prefix . +If +.Ar prefix +is specified without prefixlen, its default is 64. .Pp .Ic prefix options are as follows: