summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>2000-04-12 16:02:04 +0200
committerPavel Machek <pavel@ucw.cz>2000-04-12 16:02:04 +0200
commitac7a2145ccd5cfc54788b0218cc253e3b1721b76 (patch)
tree028014e8aa185e86c5b5c242aed0623830d1c2bf
parent12d5677aa3e6217edc7d5508ac3dbbf87edc8624 (diff)
downloadbird-ac7a2145ccd5cfc54788b0218cc253e3b1721b76.tar
bird-ac7a2145ccd5cfc54788b0218cc253e3b1721b76.zip
f_new_dynamic_attr gets third argument, type as filters know it.
-rw-r--r--filter/f-util.c4
-rw-r--r--filter/filter.h2
-rw-r--r--proto/bgp/config.Y2
-rw-r--r--proto/rip/config.Y4
4 files changed, 6 insertions, 6 deletions
diff --git a/filter/f-util.c b/filter/f-util.c
index 048dd29..2ffcd9f 100644
--- a/filter/f-util.c
+++ b/filter/f-util.c
@@ -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;
}
diff --git a/filter/filter.h b/filter/filter.h
index 45f9cd6..cac124a 100644
--- a/filter/filter.h
+++ b/filter/filter.h
@@ -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 *);
diff --git a/proto/bgp/config.Y b/proto/bgp/config.Y
index ad9cf8c..635c4f6 100644
--- a/proto/bgp/config.Y
+++ b/proto/bgp/config.Y
@@ -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
diff --git a/proto/rip/config.Y b/proto/rip/config.Y
index 6e9a72a..ebd5726 100644
--- a/proto/rip/config.Y
+++ b/proto/rip/config.Y
@@ -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