summaryrefslogtreecommitdiffstats
path: root/bgpd/rfapi/rfapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/rfapi/rfapi.c')
-rw-r--r--bgpd/rfapi/rfapi.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/bgpd/rfapi/rfapi.c b/bgpd/rfapi/rfapi.c
index 382af05..23e3eb4 100644
--- a/bgpd/rfapi/rfapi.c
+++ b/bgpd/rfapi/rfapi.c
@@ -463,7 +463,7 @@ void del_vnc_route(struct rfapi_descriptor *rfd,
bgp_aggregate_decrement(bgp, p, bpi, afi, safi);
bgp_path_info_delete(bn, bpi);
- bgp_process(bgp, bn, afi, safi);
+ bgp_process(bgp, bn, bpi, afi, safi);
} else {
vnc_zlog_debug_verbose(
"%s: Couldn't find route (safi=%d) at prefix %pFX",
@@ -549,6 +549,7 @@ void add_vnc_route(struct rfapi_descriptor *rfd, /* cookie, VPN UN addr, peer */
int flags)
{
afi_t afi; /* of the VN address */
+ struct bgp_labels bgp_labels = {};
struct bgp_path_info *new;
struct bgp_path_info *bpi;
struct bgp_dest *bn;
@@ -592,7 +593,7 @@ void add_vnc_route(struct rfapi_descriptor *rfd, /* cookie, VPN UN addr, peer */
}
}
- if (label)
+ if (label && *label != MPLS_INVALID_LABEL)
label_val = *label;
else
label_val = MPLS_LABEL_IMPLICIT_NULL;
@@ -1001,7 +1002,7 @@ void add_vnc_route(struct rfapi_descriptor *rfd, /* cookie, VPN UN addr, peer */
/* Process change. */
bgp_aggregate_increment(bgp, p, bpi, afi, safi);
- bgp_process(bgp, bn, afi, safi);
+ bgp_process(bgp, bn, bpi, afi, safi);
bgp_dest_unlock_node(bn);
vnc_zlog_debug_any(
@@ -1020,7 +1021,10 @@ void add_vnc_route(struct rfapi_descriptor *rfd, /* cookie, VPN UN addr, peer */
new->extra->vnc = XCALLOC(MTYPE_BGP_ROUTE_EXTRA_VNC,
sizeof(struct bgp_path_info_extra_vnc));
new->extra->vnc->vnc.export.rfapi_handle = (void *)rfd;
- encode_label(label_val, &new->extra->label[0]);
+
+ encode_label(label_val, &bgp_labels.label[0]);
+ bgp_labels.num_labels = 1;
+ new->extra->labels = bgp_labels_intern(&bgp_labels);
/* debug */
@@ -1046,7 +1050,7 @@ void add_vnc_route(struct rfapi_descriptor *rfd, /* cookie, VPN UN addr, peer */
}
bgp_dest_unlock_node(bn);
- bgp_process(bgp, bn, afi, safi);
+ bgp_process(bgp, bn, new, afi, safi);
vnc_zlog_debug_any(
"%s: Added route (safi=%s) at prefix %s (bn=%p, prd=%pRDP)",