From 292805c1b53b1e32c68ce0ebd05b0a0fe36b98d9 Mon Sep 17 00:00:00 2001 From: florian Date: Thu, 6 Jun 2024 06:26:14 +0000 Subject: [PATCH] Accept more compact forms of prefix delegation requests. For example, these are now valid, too: request prefix delegation on vio1 for vether4/64 request prefix delegation on vio1 for { vether5 vether6/64 } Reminded by Tim Kuijsten --- sbin/dhcp6leased/parse.y | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sbin/dhcp6leased/parse.y b/sbin/dhcp6leased/parse.y index 3b60e7726a6..9a5e845f047 100644 --- a/sbin/dhcp6leased/parse.y +++ b/sbin/dhcp6leased/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.8 2024/06/05 16:15:47 florian Exp $ */ +/* $OpenBSD: parse.y,v 1.9 2024/06/06 06:26:14 florian Exp $ */ /* * Copyright (c) 2018, 2024 Florian Obser @@ -168,17 +168,17 @@ ia_pd : REQUEST PREFIX DELEGATION ON STRING FOR { SIMPLEQ_INIT(&iface_ia_conf->iface_pd_list); SIMPLEQ_INSERT_TAIL(&iface_conf->iface_ia_list, iface_ia_conf, entry); - } '{' iface_block '}' { + } iface_block { iface_conf = NULL; iface_ia_conf = NULL; } ; -iface_block : optnl ifaceopts_l - | optnl +iface_block : '{' optnl ifaceopts_l '}' + | ifaceoptsl ; -ifaceopts_l : ifaceopts_l ifaceoptsl nl +ifaceopts_l : ifaceopts_l ifaceoptsl optnl | ifaceoptsl optnl ; -- 2.20.1