summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rad
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2018-09-16 18:58:36 +0000
committerbluhm <bluhm@openbsd.org>2018-09-16 18:58:36 +0000
commitb2ae623dea1bd24a4482c938591c9fcc8bd5e897 (patch)
tree98068067214793ef416e4886cb8e317aea5071cf /usr.sbin/rad
parentEVP_aead_chacha20_poly1305() can't actually fail. (diff)
downloadwireguard-openbsd-b2ae623dea1bd24a4482c938591c9fcc8bd5e897.tar.xz
wireguard-openbsd-b2ae623dea1bd24a4482c938591c9fcc8bd5e897.zip
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@
Diffstat (limited to 'usr.sbin/rad')
-rw-r--r--usr.sbin/rad/parse.y4
-rw-r--r--usr.sbin/rad/rad.conf.57
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: