Merge pull request #143 from LabNConsulting/working/2.0/patch/mpls-tt

2.0: bgp rfapi: fix resolution / lookup failure when using MPLS TT
This commit is contained in:
Donald Sharp 2017-02-02 07:47:43 -05:00 committed by GitHub
commit 5b346c7408

View File

@ -421,9 +421,16 @@ rfapiGetVncTunnelUnAddr (struct attr *attr, struct prefix *p)
bgp_encap_types tun_type; bgp_encap_types tun_type;
rfapiGetTunnelType (attr, &tun_type); rfapiGetTunnelType (attr, &tun_type);
if (p && tun_type == BGP_ENCAP_TYPE_MPLS) if (tun_type == BGP_ENCAP_TYPE_MPLS)
{ {
return ENOENT; /* no UN for MPLS */ if (!p)
return 0;
/* MPLS carries UN address in next hop */
rfapiNexthop2Prefix (attr, p);
if (p->family != 0)
return 0;
return ENOENT;
} }
if (attr && attr->extra) if (attr && attr->extra)
{ {