bgpd: resolve issue with sending vpn labels

Found issue where sending labels using "address-family ipv4 vpn" was
broken by the labeled-unicast changes.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
This commit is contained in:
Don Slice 2017-05-16 09:48:18 -04:00
parent c5761c2b5b
commit 604bbacbcf

View File

@ -763,7 +763,13 @@ subgroup_update_packet (struct update_subgroup *subgrp)
if (rn->prn)
prd = (struct prefix_rd *) &rn->prn->p;
tag = bgp_adv_label(rn, binfo, peer, afi, safi);
if (safi == SAFI_LABELED_UNICAST)
tag = bgp_adv_label(rn, binfo, peer, afi, safi);
else
if (binfo && binfo->extra)
tag = binfo->extra->tag;
if (bgp_labeled_safi(safi))
sprintf (label_buf, "label %u", label_pton(tag));