summaryrefslogtreecommitdiff
path: root/proto/bgp
diff options
context:
space:
mode:
authorJan Maria Matejka <mq@ucw.cz>2018-05-29 12:08:12 +0200
committerJan Maria Matejka <mq@ucw.cz>2018-05-30 17:08:49 +0200
commit13c0be19d3d2acc9c1636bbab9222aabdf27d7ac (patch)
tree8df5514a7d995becaa85ab8a9de700cfa93cb302 /proto/bgp
parentee7e2ffd265fd76dbc8c94d9c2d48da54c27ff76 (diff)
Nest: Removing separate tmpa from route propagation
This is a fundamental change of an original (1999) concept of route processing inside BIRD. During import/export, there was a temporary ea_list created which was to be used instead of the another one inside the route itself. This led to some confusion, quirks, and strange filter code that handled extended route attributes. Dropping it now. The protocol interface has changed in an uniform way -- the `struct ea_list *attrs` argument has been removed from store_tmp_attrs(), import_control(), rt_notify() and get_route_info().
Diffstat (limited to 'proto/bgp')
-rw-r--r--proto/bgp/attrs.c12
-rw-r--r--proto/bgp/bgp.h6
2 files changed, 9 insertions, 9 deletions
diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c
index 5695e1c1..d65f6334 100644
--- a/proto/bgp/attrs.c
+++ b/proto/bgp/attrs.c
@@ -1372,7 +1372,7 @@ bgp_free_prefix(struct bgp_channel *c, struct bgp_prefix *px)
*/
int
-bgp_import_control(struct proto *P, rte **new, ea_list **attrs UNUSED, struct linpool *pool UNUSED)
+bgp_import_control(struct proto *P, rte **new, struct linpool *pool UNUSED)
{
rte *e = *new;
struct proto *SRC = e->attrs->src->proto;
@@ -1536,7 +1536,7 @@ bgp_update_attrs(struct bgp_proto *p, struct bgp_channel *c, rte *e, ea_list *at
}
void
-bgp_rt_notify(struct proto *P, struct channel *C, net *n, rte *new, rte *old, ea_list *attrs)
+bgp_rt_notify(struct proto *P, struct channel *C, net *n, rte *new, rte *old)
{
struct bgp_proto *p = (void *) P;
struct bgp_channel *c = (void *) C;
@@ -1546,7 +1546,7 @@ bgp_rt_notify(struct proto *P, struct channel *C, net *n, rte *new, rte *old, ea
if (new)
{
- attrs = bgp_update_attrs(p, c, new, attrs, bgp_linpool2);
+ struct ea_list *attrs = bgp_update_attrs(p, c, new, new->attrs->eattrs, bgp_linpool2);
/* If attributes are invalid, we fail back to withdraw */
buck = attrs ? bgp_get_bucket(c, attrs) : bgp_get_withdraw_bucket(c);
@@ -2007,10 +2007,10 @@ bgp_get_attr(eattr *a, byte *buf, int buflen)
}
void
-bgp_get_route_info(rte *e, byte *buf, ea_list *attrs)
+bgp_get_route_info(rte *e, byte *buf)
{
- eattr *p = ea_find(attrs, EA_CODE(PROTOCOL_BGP, BA_AS_PATH));
- eattr *o = ea_find(attrs, EA_CODE(PROTOCOL_BGP, BA_ORIGIN));
+ eattr *p = ea_find(e->attrs->eattrs, EA_CODE(PROTOCOL_BGP, BA_AS_PATH));
+ eattr *o = ea_find(e->attrs->eattrs, EA_CODE(PROTOCOL_BGP, BA_ORIGIN));
u32 origas;
buf += bsprintf(buf, " (%d", e->pref);
diff --git a/proto/bgp/bgp.h b/proto/bgp/bgp.h
index de05dcfb..1235ee78 100644
--- a/proto/bgp/bgp.h
+++ b/proto/bgp/bgp.h
@@ -505,10 +505,10 @@ void bgp_free_prefix(struct bgp_channel *c, struct bgp_prefix *bp);
int bgp_rte_better(struct rte *, struct rte *);
int bgp_rte_mergable(rte *pri, rte *sec);
int bgp_rte_recalculate(rtable *table, net *net, rte *new, rte *old, rte *old_best);
-void bgp_rt_notify(struct proto *P, struct channel *C, net *n, rte *new, rte *old, ea_list *attrs);
-int bgp_import_control(struct proto *, struct rte **, struct ea_list **, struct linpool *);
+void bgp_rt_notify(struct proto *P, struct channel *C, net *n, rte *new, rte *old);
+int bgp_import_control(struct proto *, struct rte **, struct linpool *);
int bgp_get_attr(struct eattr *e, byte *buf, int buflen);
-void bgp_get_route_info(struct rte *, byte *buf, struct ea_list *attrs);
+void bgp_get_route_info(struct rte *, byte *buf);
/* packets.c */