mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 01:31:55 +00:00
Fixes unnamed protocols from templates
This commit is contained in:
parent
d0e23d42de
commit
9fe1d3ca8a
@ -183,16 +183,18 @@ proto_name:
|
||||
}
|
||||
| FROM SYM {
|
||||
struct symbol *s = cf_default_name(this_proto->protocol->template, &this_proto->protocol->name_counter);
|
||||
s->class = this_proto->class;
|
||||
s->def = this_proto;
|
||||
this_proto->name = s->name;
|
||||
|
||||
if (($2->class != SYM_TEMPLATE) && ($2->class != SYM_PROTO)) cf_error("Template or protocol name expected");
|
||||
proto_copy_config(this_proto, $2->def);
|
||||
}
|
||||
| SYM FROM SYM {
|
||||
if (($3->class != SYM_TEMPLATE) && ($3->class != SYM_PROTO)) cf_error("Template or protocol name expected");
|
||||
|
||||
cf_define_symbol($1, this_proto->class, this_proto);
|
||||
this_proto->name = $1->name;
|
||||
|
||||
if (($3->class != SYM_TEMPLATE) && ($3->class != SYM_PROTO)) cf_error("Template or protocol name expected");
|
||||
proto_copy_config(this_proto, $3->def);
|
||||
}
|
||||
;
|
||||
|
Loading…
Reference in New Issue
Block a user