0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2025-03-11 17:08:46 +00:00

Merge commit 'ab47c2ae466f785212f0519388417ebb31b2cf24' into mq-merge-step-1

This commit is contained in:
Maria Matejka 2024-01-28 14:20:44 +01:00
commit 7cc3d3009a

View File

@ -369,8 +369,8 @@ custom_attr: ATTRIBUTE BGP NUM type symbol ';' {
if($3 > 255 || $3 < 1)
cf_error("Invalid attribute number. (Given %i, must be 1-255.)", $3);
if($4 != T_BYTESTRING)
cf_error("Attribute type must be bytestring, not %s.", f_type_name($4));
struct f_dynamic_attr* a = (struct f_dynamic_attr*) malloc(sizeof(struct f_dynamic_attr));
cf_error("Attribute type must be bytestring, not %s", f_type_name($4));
struct f_dynamic_attr *a = cfg_alloc(sizeof(struct f_dynamic_attr));
*a = f_new_dynamic_attr(f_type_attr($4), T_BYTESTRING, EA_CODE(PROTOCOL_BGP, $3));
a->flags = BAF_TRANSITIVE | BAF_OPTIONAL;
cf_define_symbol(new_config, $5, SYM_ATTRIBUTE, attribute, a);