diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2018-09-16 18:58:37 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2018-09-16 18:58:37 +0000 |
commit | 1bb07b53c8d2d8b521037ef518ead7baeb2a6391 (patch) | |
tree | 57e0902197aadb05307bb49bd6beb4cbb4c6b264 | |
parent | 7a902aa3c5a505fc6d274125406089275833f6cf (diff) |
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@
-rw-r--r-- | usr.sbin/rad/parse.y | 4 | ||||
-rw-r--r-- | usr.sbin/rad/rad.conf.5 | 7 |
2 files changed, 8 insertions, 3 deletions
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 <florian@openbsd.org> @@ -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 <florian@openbsd.org> .\" Copyright (c) 2005 Esben Norby <norby@openbsd.org> @@ -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: |