From: Ondrej Zajicek Date: Fri, 22 May 2015 09:12:48 +0000 (+0200) Subject: Fixes unnamed protocols from templates X-Git-Tag: v1.6.0~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9fe1d3ca8a6420b4bdaf15a54ab7b13be6cc07eb;p=thirdparty%2Fbird.git Fixes unnamed protocols from templates --- diff --git a/nest/config.Y b/nest/config.Y index 939bed6a8..375518022 100644 --- a/nest/config.Y +++ b/nest/config.Y @@ -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); } ;