From cddacf98708a2e5a76691f7b2a8edde7db7fc01e Mon Sep 17 00:00:00 2001 From: florian Date: Fri, 20 Jul 2018 17:48:58 +0000 Subject: [PATCH] We need to track the auto prefix in ra_prefix_conf otherwise we can't configure its options. Trying so lead to a crash. Found the hard way by & OK sthen --- usr.sbin/rad/parse.y | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/usr.sbin/rad/parse.y b/usr.sbin/rad/parse.y index 322f0e7e29a..70c3819e4a5 100644 --- a/usr.sbin/rad/parse.y +++ b/usr.sbin/rad/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.4 2018/07/20 13:17:02 florian Exp $ */ +/* $OpenBSD: parse.y,v 1.5 2018/07/20 17:48:58 florian Exp $ */ /* * Copyright (c) 2018 Florian Obser @@ -243,8 +243,9 @@ ra_ifaceoptsl : NO AUTO PREFIX { } | AUTO PREFIX { if (ra_iface_conf->autoprefix == NULL) - ra_iface_conf->autoprefix = - ra_prefix_conf = conf_get_ra_prefix(NULL, 0); + ra_iface_conf->autoprefix = + conf_get_ra_prefix(NULL, 0); + ra_prefix_conf = ra_iface_conf->autoprefix; } ra_prefix_block { ra_prefix_conf = NULL; } -- 2.20.1