bgpd: Additional check on presence of tag/label

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>
This commit is contained in:
vivek 2017-05-24 17:50:29 -07:00 committed by Donald Sharp
parent 5b4168879d
commit 0ee26848f3

View 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;