mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 06:23:04 +00:00
bgpd: Install SAFI_LABELED_UNICAST routes in SAFI_UNICAST table
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
This commit is contained in:
parent
9bedbb1e52
commit
0826e83cf6
@ -4099,7 +4099,7 @@ bgp_static_update_safi (struct bgp *bgp, struct prefix *p,
|
||||
struct attr attr = { 0 };
|
||||
struct bgp_info *ri;
|
||||
#if ENABLE_BGP_VNC
|
||||
u_int32_t label = 0;
|
||||
mpls_label_t label = 0;
|
||||
#endif
|
||||
union gw_addr add;
|
||||
|
||||
@ -4209,7 +4209,7 @@ bgp_static_update_safi (struct bgp *bgp, struct prefix *p,
|
||||
ri->uptime = bgp_clock ();
|
||||
#if ENABLE_BGP_VNC
|
||||
if (ri->extra)
|
||||
label = decode_label (ri->extra->tag);
|
||||
label = decode_label (&ri->extra->label);
|
||||
#endif
|
||||
|
||||
/* Process change. */
|
||||
@ -4235,7 +4235,7 @@ bgp_static_update_safi (struct bgp *bgp, struct prefix *p,
|
||||
new->extra = bgp_info_extra_new();
|
||||
new->extra->label = bgp_static->label;
|
||||
#if ENABLE_BGP_VNC
|
||||
label = decode_label (bgp_static->label);
|
||||
label = decode_label (&bgp_static->label);
|
||||
#endif
|
||||
|
||||
/* Aggregate address increment. */
|
||||
@ -8147,7 +8147,7 @@ route_vty_out_detail_header (struct vty *vty, struct bgp *bgp,
|
||||
int local_as = 0;
|
||||
int first = 1;
|
||||
int has_valid_label = 0;
|
||||
uint32_t label = 0;
|
||||
mpls_label_t label;
|
||||
json_object *json_adv_to = NULL;
|
||||
|
||||
p = &rn->p;
|
||||
|
@ -1347,7 +1347,7 @@ bgp_zebra_announce (struct bgp_node *rn, struct prefix *p, struct bgp_info *info
|
||||
{
|
||||
has_valid_label = 1;
|
||||
label = label_pton(&info->extra->label);
|
||||
stream_put (bgp_label_buf, &label, sizeof (u_int32_t));
|
||||
stream_put (bgp_label_buf, &label, sizeof (mpls_label_t));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1378,7 +1378,7 @@ bgp_zebra_announce (struct bgp_node *rn, struct prefix *p, struct bgp_info *info
|
||||
{
|
||||
has_valid_label = 1;
|
||||
label = label_pton(&mpinfo->extra->label);
|
||||
stream_put (bgp_label_buf, &label, sizeof (u_int32_t));
|
||||
stream_put (bgp_label_buf, &label, sizeof (mpls_label_t));
|
||||
}
|
||||
valid_nh_count++;
|
||||
}
|
||||
@ -1567,7 +1567,7 @@ bgp_zebra_announce (struct bgp_node *rn, struct prefix *p, struct bgp_info *info
|
||||
{
|
||||
has_valid_label = 1;
|
||||
label = label_pton(&info->extra->label);
|
||||
stream_put (bgp_label_buf, &label, sizeof (u_int32_t));
|
||||
stream_put (bgp_label_buf, &label, sizeof (mpls_label_t));
|
||||
}
|
||||
valid_nh_count++;
|
||||
}
|
||||
@ -1616,7 +1616,7 @@ bgp_zebra_announce (struct bgp_node *rn, struct prefix *p, struct bgp_info *info
|
||||
{
|
||||
has_valid_label = 1;
|
||||
label = label_pton(&mpinfo->extra->label);
|
||||
stream_put (bgp_label_buf, &label, sizeof (u_int32_t));
|
||||
stream_put (bgp_label_buf, &label, sizeof (mpls_label_t));
|
||||
}
|
||||
valid_nh_count++;
|
||||
}
|
||||
|
@ -1170,7 +1170,7 @@ add_vnc_route (
|
||||
/* save backref to rfapi handle */
|
||||
assert (bgp_info_extra_get (new));
|
||||
new->extra->vnc.export.rfapi_handle = (void *) rfd;
|
||||
encode_label (label_val, new->extra->tag);
|
||||
encode_label (label_val, &new->extra->label);
|
||||
|
||||
/* debug */
|
||||
|
||||
@ -1197,7 +1197,7 @@ add_vnc_route (
|
||||
bgp, prd, table, p, new);
|
||||
}
|
||||
bgp_unlock_node (prn);
|
||||
encode_label (label_val, bn->local_label);
|
||||
encode_label (label_val, &bn->local_label);
|
||||
}
|
||||
|
||||
bgp_unlock_node (bn);
|
||||
|
@ -543,7 +543,7 @@ rfapiBgpInfoCreate (
|
||||
rfapi_time (&new->extra->vnc.import.create_time);
|
||||
}
|
||||
if (label)
|
||||
encode_label (*label, new->extra->tag);
|
||||
encode_label (*label, &new->extra->label);
|
||||
new->type = type;
|
||||
new->sub_type = sub_type;
|
||||
new->peer = peer;
|
||||
@ -1431,7 +1431,7 @@ rfapiRouteInfo2NextHopEntry (
|
||||
vo->v.l2addr.local_nve_id = bi->extra->vnc.import.rd.val[1];
|
||||
|
||||
/* label comes from MP_REACH_NLRI label */
|
||||
vo->v.l2addr.label = decode_label (bi->extra->tag);
|
||||
vo->v.l2addr.label = decode_label (&bi->extra->label);
|
||||
|
||||
new->vn_options = vo;
|
||||
|
||||
@ -4542,7 +4542,7 @@ rfapiBgpTableFilteredImport (
|
||||
continue;
|
||||
|
||||
if (bi->extra)
|
||||
label = decode_label (bi->extra->tag);
|
||||
label = decode_label (&bi->extra->label);
|
||||
(*rfapiBgpInfoFilteredImportFunction (safi)) (
|
||||
it, /* which import table */
|
||||
FIF_ACTION_UPDATE,
|
||||
|
@ -735,7 +735,7 @@ rfapiRibBi2Ri(
|
||||
vo->v.l2addr.local_nve_id = bi->extra->vnc.import.rd.val[1];
|
||||
|
||||
/* label comes from MP_REACH_NLRI label */
|
||||
vo->v.l2addr.label = decode_label (bi->extra->tag);
|
||||
vo->v.l2addr.label = decode_label (&bi->extra->label);
|
||||
|
||||
rfapi_vn_options_free (ri->vn_options); /* maybe free old version */
|
||||
ri->vn_options = vo;
|
||||
|
@ -478,7 +478,7 @@ rfapi_vty_out_vncinfo (
|
||||
}
|
||||
|
||||
if (bi->extra != NULL)
|
||||
vty_out (vty, " label=%u", decode_label (bi->extra->tag));
|
||||
vty_out (vty, " label=%u", decode_label (&bi->extra->label));
|
||||
|
||||
if (!rfapiGetVncLifetime (bi->attr, &lifetime))
|
||||
{
|
||||
@ -1178,7 +1178,7 @@ rfapiPrintRemoteRegBi (
|
||||
inet_ntop (pfx_vn.family, &pfx_vn.u.prefix, buf_ntop, BUFSIZ));
|
||||
if (bi->extra)
|
||||
{
|
||||
u_int32_t l = decode_label (bi->extra->tag);
|
||||
u_int32_t l = decode_label (&bi->extra->label);
|
||||
snprintf (buf_vn, BUFSIZ, "Label: %d", l);
|
||||
}
|
||||
else /* should never happen */
|
||||
@ -1305,7 +1305,7 @@ rfapiPrintRemoteRegBi (
|
||||
}
|
||||
if (tun_type != BGP_ENCAP_TYPE_MPLS && bi->extra)
|
||||
{
|
||||
u_int32_t l = decode_label (bi->extra->tag);
|
||||
u_int32_t l = decode_label (&bi->extra->label);
|
||||
if (!MPLS_LABEL_IS_NULL (l))
|
||||
{
|
||||
fp (out, " Label: %d", l);
|
||||
|
@ -536,7 +536,7 @@ vnc_import_bgp_add_route_mode_resolve_nve_one_bi (
|
||||
ecommunity_merge (new_ecom, bi->attr->extra->ecommunity);
|
||||
|
||||
if (bi->extra)
|
||||
label = decode_label (bi->extra->tag);
|
||||
label = decode_label (&bi->extra->label);
|
||||
|
||||
add_vnc_route (
|
||||
&vncHDResolveNve,
|
||||
@ -1919,7 +1919,7 @@ vnc_import_bgp_exterior_add_route_it (
|
||||
if (bi_interior->extra)
|
||||
{
|
||||
prd = &bi_interior->extra->vnc.import.rd;
|
||||
label = decode_label (bi_interior->extra->tag);
|
||||
label = decode_label (&bi_interior->extra->label);
|
||||
}
|
||||
else
|
||||
prd = NULL;
|
||||
@ -2101,7 +2101,7 @@ vnc_import_bgp_exterior_del_route (
|
||||
if (bi_interior->extra)
|
||||
{
|
||||
prd = &bi_interior->extra->vnc.import.rd;
|
||||
label = decode_label (bi_interior->extra->tag);
|
||||
label = decode_label (&bi_interior->extra->label);
|
||||
}
|
||||
else
|
||||
prd = NULL;
|
||||
@ -2249,7 +2249,7 @@ vnc_import_bgp_exterior_add_route_interior (
|
||||
if (bi_interior->extra)
|
||||
{
|
||||
prd = &bi_interior->extra->vnc.import.rd;
|
||||
label = decode_label (bi_interior->extra->tag);
|
||||
label = decode_label (&bi_interior->extra->label);
|
||||
}
|
||||
else
|
||||
prd = NULL;
|
||||
@ -2364,7 +2364,7 @@ vnc_import_bgp_exterior_add_route_interior (
|
||||
if (bi->extra)
|
||||
{
|
||||
prd = &bi->extra->vnc.import.rd;
|
||||
label = decode_label (bi->extra->tag);
|
||||
label = decode_label (&bi->extra->label);
|
||||
}
|
||||
else
|
||||
prd = NULL;
|
||||
@ -2388,7 +2388,7 @@ vnc_import_bgp_exterior_add_route_interior (
|
||||
if (bi_interior->extra)
|
||||
{
|
||||
prd = &bi_interior->extra->vnc.import.rd;
|
||||
label = decode_label (bi_interior->extra->tag);
|
||||
label = decode_label (&bi_interior->extra->label);
|
||||
}
|
||||
else
|
||||
prd = NULL;
|
||||
@ -2512,7 +2512,7 @@ vnc_import_bgp_exterior_add_route_interior (
|
||||
if (bi_interior->extra)
|
||||
{
|
||||
prd = &bi_interior->extra->vnc.import.rd;
|
||||
label = decode_label (bi_interior->extra->tag);
|
||||
label = decode_label (&bi_interior->extra->label);
|
||||
}
|
||||
else
|
||||
prd = NULL;
|
||||
@ -2633,7 +2633,7 @@ vnc_import_bgp_exterior_del_route_interior (
|
||||
if (bi_interior->extra)
|
||||
{
|
||||
prd = &bi_interior->extra->vnc.import.rd;
|
||||
label = decode_label (bi_interior->extra->tag);
|
||||
label = decode_label (&bi_interior->extra->label);
|
||||
}
|
||||
else
|
||||
prd = NULL;
|
||||
@ -2716,7 +2716,7 @@ vnc_import_bgp_exterior_del_route_interior (
|
||||
if (bi->extra)
|
||||
{
|
||||
prd = &bi->extra->vnc.import.rd;
|
||||
label = decode_label (bi->extra->tag);
|
||||
label = decode_label (&bi->extra->label);
|
||||
}
|
||||
else
|
||||
prd = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user