]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Additional check on presence of tag/label
authorvivek <vivek@cumulusnetworks.com>
Thu, 25 May 2017 00:50:29 +0000 (17:50 -0700)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 12 Jul 2017 16:48:04 +0000 (12:48 -0400)
In the case of EVPN, not all EVPN routes will necessarily have a tag/label.
Do an additional check on presence of tag, where needed.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
bgpd/bgp_label.h

index c98f4531f616e51d75a162104d476f86259bee06..a0994d68a3063339863745bc2a20630841f0880d 100644 (file)
@@ -41,6 +41,9 @@ extern int bgp_nlri_parse_label (struct peer *peer, struct attr *attr,
 static inline int
 bgp_labeled_safi (safi_t safi)
 {
+  /* NOTE: This API really says a label (tag) MAY be present. Not all EVPN
+   * routes will have a label.
+   */
   if ((safi == SAFI_LABELED_UNICAST) || (safi == SAFI_MPLS_VPN) ||
       (safi == SAFI_EVPN))
     return 1;