bgpd rfapi: pass received label on resolved NVE imports

Signed-off-by: Lou Berger <lberger@labn.net>
This commit is contained in:
Lou Berger 2017-01-28 19:21:03 -05:00
parent 104665b171
commit f191d4fa6e

View File

@ -464,6 +464,7 @@ vnc_import_bgp_add_route_mode_resolve_nve_one_bi (
uint32_t lifetime; uint32_t lifetime;
uint32_t *plifetime; uint32_t *plifetime;
struct bgp_attr_encap_subtlv *encaptlvs; struct bgp_attr_encap_subtlv *encaptlvs;
uint32_t label = 0;
vnc_zlog_debug_verbose ("%s: entry", __func__); vnc_zlog_debug_verbose ("%s: entry", __func__);
@ -519,6 +520,9 @@ vnc_import_bgp_add_route_mode_resolve_nve_one_bi (
if (bi->attr && bi->attr->extra && bi->attr->extra->ecommunity) if (bi->attr && bi->attr->extra && bi->attr->extra->ecommunity)
ecommunity_merge (new_ecom, bi->attr->extra->ecommunity); ecommunity_merge (new_ecom, bi->attr->extra->ecommunity);
if (bi->extra)
label = decode_label (bi->extra->tag);
add_vnc_route ( add_vnc_route (
&vncHDResolveNve, &vncHDResolveNve,
bgp, bgp,
@ -533,7 +537,7 @@ vnc_import_bgp_add_route_mode_resolve_nve_one_bi (
NULL, NULL,
new_ecom, new_ecom,
med, /* NULL => don't set med */ med, /* NULL => don't set med */
NULL, /* label: default */ (label?&label:NULL), /* NULL= default */
ZEBRA_ROUTE_BGP_DIRECT, ZEBRA_ROUTE_BGP_DIRECT,
BGP_ROUTE_REDISTRIBUTE, BGP_ROUTE_REDISTRIBUTE,
RFAPI_AHR_RFPOPT_IS_VNCTLV); /* flags */ RFAPI_AHR_RFPOPT_IS_VNCTLV); /* flags */