0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 17:51:53 +00:00

Merge commit '4972590e' into thread-next

This commit is contained in:
Maria Matejka 2023-10-12 09:29:51 +02:00
commit b708dd367a
4 changed files with 4 additions and 17 deletions

View File

@ -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();

View File

@ -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

View File

@ -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)
{

View File

@ -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;
}