summaryrefslogtreecommitdiffstats
path: root/bgpd
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/rfapi/rfapi_import.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/bgpd/rfapi/rfapi_import.c b/bgpd/rfapi/rfapi_import.c
index 4d35af264..adb54fd0e 100644
--- a/bgpd/rfapi/rfapi_import.c
+++ b/bgpd/rfapi/rfapi_import.c
@@ -421,9 +421,16 @@ rfapiGetVncTunnelUnAddr (struct attr *attr, struct prefix *p)
bgp_encap_types 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)
{