]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: resolve issue with sending vpn labels
authorDon Slice <dslice@cumulusnetworks.com>
Tue, 16 May 2017 13:48:18 +0000 (09:48 -0400)
committerDon Slice <dslice@cumulusnetworks.com>
Tue, 16 May 2017 13:48:18 +0000 (09:48 -0400)
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>
bgpd/bgp_updgrp_packet.c

index f734763b70034e2841b67b8a09fbafd18c6d41cc..87a9cfdcfa7eabbe65481dbd4c2c6b8a2a5acd13 100644 (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));