mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2025-01-03 07:31:54 +00:00
BGP: fixed MPLS label stack receiving bug
Introduced in 515df18da7
while merging v2 to v3.
This commit is contained in:
parent
ea0f2c6194
commit
6a80214fb3
@ -505,8 +505,6 @@ struct bgp_parse_state {
|
||||
uint err_subcode;
|
||||
jmp_buf err_jmpbuf;
|
||||
|
||||
adata *mpls_labels;
|
||||
|
||||
/* Cached state for bgp_rte_update() */
|
||||
u32 last_id;
|
||||
struct rte_src *last_src;
|
||||
|
@ -1077,6 +1077,8 @@ bgp_apply_next_hop(struct bgp_parse_state *s, ea_list **to, ip_addr gw, ip_addr
|
||||
static void
|
||||
bgp_apply_mpls_labels(struct bgp_parse_state *s, ea_list **to, u32 lnum, u32 labels[lnum])
|
||||
{
|
||||
bgp_set_attr_data(to, BA_MPLS_LABEL_STACK, 0, labels, lnum * sizeof labels[0]);
|
||||
|
||||
if (lnum > MPLS_MAX_LABEL_STACK)
|
||||
{
|
||||
REPORT("Too many MPLS labels ($u)", lnum);
|
||||
@ -1087,7 +1089,7 @@ bgp_apply_mpls_labels(struct bgp_parse_state *s, ea_list **to, u32 lnum, u32 lab
|
||||
|
||||
/* Handle implicit NULL as empty MPLS stack */
|
||||
if ((lnum == 1) && (labels[0] == BGP_MPLS_NULL))
|
||||
lnum = s->mpls_labels->length = 0;
|
||||
lnum = 0;
|
||||
|
||||
if (s->channel->cf->gw_mode == GW_DIRECT)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user