From: katerina.kubecova Date: Wed, 20 Sep 2023 07:50:22 +0000 (+0200) Subject: Filter: Function unset() accepts attributes declared in config X-Git-Tag: v2.14~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8cc9d198c7ab906e176a7926484ea85d4f53cab6;p=thirdparty%2Fbird.git Filter: Function unset() accepts attributes declared in config --- diff --git a/filter/config.Y b/filter/config.Y index a87fb0e5f..dfabddf7b 100644 --- a/filter/config.Y +++ b/filter/config.Y @@ -1002,6 +1002,15 @@ cmd: | UNSET '(' dynamic_attr ')' ';' { $$ = f_new_inst(FI_EA_UNSET, $3); } + | UNSET '(' symbol_known ')' ';' { + switch ($3->class) { + case SYM_ATTRIBUTE: + $$ = f_new_inst(FI_EA_UNSET, *$3->attribute); + break; + default: + cf_error("Can't unset symbol %s", $3->name); + } + } | break_command var_list_r ';' { $$ = f_print($2, !!$2, $1); }