From e377418325c501ce1af96e7991d669fc5fc5555b Mon Sep 17 00:00:00 2001 From: florian Date: Wed, 28 Nov 2018 06:41:31 +0000 Subject: Discovered prefixes should not override explicitly configured prefixes. That way one can have multiple prefixes configured on an interface and set "autonomous address-configuration no" in rad.conf to tell clients to not form addresses from some of these prefixes. Pointed out by Ross L Richardson (openbsd AT rlr.id.au), thanks! OK phessler --- usr.sbin/rad/frontend.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'usr.sbin/rad') diff --git a/usr.sbin/rad/frontend.c b/usr.sbin/rad/frontend.c index 152f13a2738..57f725f06f7 100644 --- a/usr.sbin/rad/frontend.c +++ b/usr.sbin/rad/frontend.c @@ -1,4 +1,4 @@ -/* $OpenBSD: frontend.c,v 1.18 2018/11/21 09:50:19 reyk Exp $ */ +/* $OpenBSD: frontend.c,v 1.19 2018/11/28 06:41:31 florian Exp $ */ /* * Copyright (c) 2018 Florian Obser @@ -791,10 +791,6 @@ merge_ra_interfaces(void) ra_iface_conf = find_ra_iface_conf( &frontend_conf->ra_iface_list, ra_iface->conf_name); - if (ra_iface_conf->autoprefix) - get_interface_prefixes(ra_iface, - ra_iface_conf->autoprefix); - log_debug("add static prefixes for %s", ra_iface->name); SIMPLEQ_FOREACH(ra_prefix_conf, &ra_iface_conf->ra_prefix_list, @@ -803,6 +799,11 @@ merge_ra_interfaces(void) &ra_prefix_conf->prefix, ra_prefix_conf->prefixlen, ra_prefix_conf); } + + if (ra_iface_conf->autoprefix) + get_interface_prefixes(ra_iface, + ra_iface_conf->autoprefix); + build_packet(ra_iface); } } -- cgit v1.2.3-59-g8ed1b