From 604bbacbcf9e3dbee2c72d2454d20c54a3f9803f Mon Sep 17 00:00:00 2001 From: Don Slice Date: Tue, 16 May 2017 09:48:18 -0400 Subject: [PATCH] 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 --- bgpd/bgp_updgrp_packet.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bgpd/bgp_updgrp_packet.c b/bgpd/bgp_updgrp_packet.c index f734763b70..87a9cfdcfa 100644 --- a/bgpd/bgp_updgrp_packet.c +++ b/bgpd/bgp_updgrp_packet.c @@ -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)); -- 2.39.5