]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
f_new_dynamic_attr gets third argument, type as filters know it.
authorPavel Machek <pavel@ucw.cz>
Wed, 12 Apr 2000 14:02:04 +0000 (14:02 +0000)
committerPavel Machek <pavel@ucw.cz>
Wed, 12 Apr 2000 14:02:04 +0000 (14:02 +0000)
filter/f-util.c
filter/filter.h
proto/bgp/config.Y
proto/rip/config.Y

index 048dd29f972c5525cfe72531bc32da813ccd3799..2ffcd9f6f5403879ed9ee199741d390838ea7ab2 100644 (file)
@@ -21,10 +21,10 @@ f_new_inst(void)
 }
 
 struct f_inst *
-f_new_dynamic_attr(int type, int code)
+f_new_dynamic_attr(int type, int f_type, int code)
 {
   struct f_inst *f = f_new_inst();
-  f->aux = T_PATH; /* type; HACK!!! */
+  f->aux = f_type;
   f->a2.i = code;
   return f;
 }
index 45f9cd6c92415981b111c3ae91468d8be91f76f5..cac124a40307d06d94dbb1a78c749061c85ab516 100644 (file)
@@ -64,7 +64,7 @@ struct filter {
 
 void filters_postconfig(void);
 struct f_inst *f_new_inst(void);
-struct f_inst *f_new_dynamic_attr(int type, int code);
+struct f_inst *f_new_dynamic_attr(int type, int f_type, int code);     /* Type as core knows it, type as filters know it, and code */
 struct f_tree *f_new_tree(void);
 
 struct f_tree *build_tree(struct f_tree *);
index ad9cf8ca186a15b95e0443b6097e87ad84ac9f2d..635c4f64949be5e6c53cae0b1dcc1db8b9577625 100644 (file)
@@ -50,7 +50,7 @@ bgp_proto:
  | bgp_proto NEXT HOP SELF ';' { BGP_CFG->next_hop_self = 1; }
  ;
 
-CF_ADDTO(dynamic_attr, BGP_PATH { $$ = f_new_dynamic_attr(EAF_TYPE_AS_PATH, EA_CODE(EAP_BGP, BA_AS_PATH)); })
+CF_ADDTO(dynamic_attr, BGP_PATH { $$ = f_new_dynamic_attr(EAF_TYPE_AS_PATH, T_PATH, EA_CODE(EAP_BGP, BA_AS_PATH)); })
 
 CF_CODE
 
index 6e9a72a9ce389901ae1262a42e242d29aa443197..ebd57266ca89bb1d130a8049e65ea31a5a04a062 100644 (file)
@@ -98,8 +98,8 @@ rip_iface_list:
  | rip_iface_list ',' rip_iface
  ;
 
-CF_ADDTO(dynamic_attr, RIP_METRIC { $$ = f_new_dynamic_attr(EAF_TYPE_INT | EAF_TEMP, EA_RIP_METRIC); })
-CF_ADDTO(dynamic_attr, RIP_TAG { $$ = f_new_dynamic_attr(EAF_TYPE_INT | EAF_TEMP, EA_RIP_TAG); })
+CF_ADDTO(dynamic_attr, RIP_METRIC { $$ = f_new_dynamic_attr(EAF_TYPE_INT | EAF_TEMP, T_INT, EA_RIP_METRIC); })
+CF_ADDTO(dynamic_attr, RIP_TAG { $$ = f_new_dynamic_attr(EAF_TYPE_INT | EAF_TEMP, T_INT, EA_RIP_TAG); })
 
 CF_CODE