diff --git a/nest/proto.c b/nest/proto.c index b0ca57da..5b00cc9d 100644 --- a/nest/proto.c +++ b/nest/proto.c @@ -274,7 +274,6 @@ proto_add_channel(struct proto *p, struct channel_config *cf) c->merge_limit = cf->merge_limit; c->in_keep = cf->in_keep; c->rpki_reload = cf->rpki_reload; - c->bmp_hack = cf->bmp_hack; c->channel_state = CS_DOWN; c->last_state_change = current_time(); diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c index 6fd7abae..dfd6f1d3 100644 --- a/proto/bgp/attrs.c +++ b/proto/bgp/attrs.c @@ -1236,15 +1236,6 @@ bgp_register_attrs(void) } } -void -bgp_fix_attr_flags(ea_list *attrs) -{ - for (u8 i = 0; i < attrs->count; i++) - { - attrs->attrs[i].flags = bgp_attr_table[EA_ID(attrs->attrs[i].id)].flags; - } -} - /* * Attribute export diff --git a/proto/bgp/bgp.h b/proto/bgp/bgp.h index 7e35b37c..cc2b538a 100644 --- a/proto/bgp/bgp.h +++ b/proto/bgp/bgp.h @@ -579,8 +579,6 @@ void bgp_store_error(struct bgp_proto *p, struct bgp_conn *c, u8 class, u32 code void bgp_stop(struct bgp_proto *p, int subcode, byte *data, uint len); const char *bgp_format_role_name(u8 role); -void bgp_fix_attr_flags(ea_list *attrs); - static inline int rte_resolvable(const rte *rt) { diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c index 2c5c04a2..657d5374 100644 --- a/proto/bgp/packets.c +++ b/proto/bgp/packets.c @@ -2449,13 +2449,12 @@ bgp_bmp_encode_rte(struct bgp_channel *c, byte *buf, const net_addr *n, // struct bgp_proto *p = (void *) c->c.proto; byte *pkt = buf + BGP_HEADER_LENGTH; - ea_list *attrs = new ? new->attrs->eattrs : NULL; + ea_list *attrs = new ? new->attrs : NULL; uint ea_size = new ? (sizeof(ea_list) + attrs->count * sizeof(eattr)) : 0; uint bucket_size = sizeof(struct bgp_bucket) + ea_size; uint prefix_size = sizeof(struct bgp_prefix) + n->length; - struct lp_state tmpp; - lp_save(tmp_linpool, &tmpp); + struct lp_state *tmpp = lp_save(tmp_linpool); /* Temporary bucket */ struct bgp_bucket *b = tmp_allocz(bucket_size); @@ -2469,14 +2468,14 @@ bgp_bmp_encode_rte(struct bgp_channel *c, byte *buf, const net_addr *n, struct bgp_prefix *px = tmp_allocz(prefix_size); px->path_id = src->private_id; net_copy(px->net, n); - add_tail(&b->prefixes, &px->buck_node); + add_tail(&b->prefixes, &px->buck_node_xx); byte *end = bgp_create_update_bmp(c, pkt, b, !!new); if (end) bgp_bmp_prepare_bgp_hdr(buf, end - buf, PKT_UPDATE); - lp_restore(tmp_linpool, &tmpp); + lp_restore(tmp_linpool, tmpp); return end; }