]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd rfapi: use VN as nexthop for MPLS tunnels too
authorLou Berger <lberger@labn.net>
Fri, 13 Jan 2017 15:18:48 +0000 (10:18 -0500)
committerLou Berger <lberger@labn.net>
Tue, 17 Jan 2017 19:59:10 +0000 (14:59 -0500)
     Also minor show format cleanup

Signed-off-by: Lou Berger <lberger@labn.net>
bgpd/rfapi/rfapi.c
bgpd/rfapi/rfapi_encap_tlv.c
bgpd/rfapi/rfapi_import.c
bgpd/rfapi/rfapi_vty.c

index 5945eb09e62c99c51dfbc46b1136c8cfed904a65..bc2fb9526fb3b1f0075cf6ec8ab4194267dcaeb9 100644 (file)
@@ -768,7 +768,6 @@ add_vnc_route (
           bgp_attr_extra_free (&attr);
           return;
         }
-      nexthop = un_addr;    /* UN used as MPLS NLRI nexthop */
     }
 
   if (local_pref)
index d8713a26b23aa5ea501f5948d2ab82e0744bb27c..171ea8f24dc53dc0f7123261754e8d1b7bc4f4f6 100644 (file)
@@ -131,8 +131,7 @@ rfapi_tunneltype_option_to_tlv (
       break;
 
     case BGP_ENCAP_TYPE_MPLS:
-      _RTTO_MAYBE_ADD_ENDPOINT_ADDRESS (mpls);
-      bgp_encap_type_mpls_to_tlv (&tto->bgpinfo.mpls, attr);
+      /* nothing to do for MPLS */
       break;
 
     case BGP_ENCAP_TYPE_MPLS_IN_GRE:
index 25c05e65f87d0a1cb1a0915174128d833e63525e..ba264972072991769448b4b1460b7aac1ab344da 100644 (file)
@@ -423,10 +423,7 @@ rfapiGetVncTunnelUnAddr (struct attr *attr, struct prefix *p)
   rfapiGetTunnelType (attr, &tun_type);
   if (p && tun_type == BGP_ENCAP_TYPE_MPLS) 
     {
-      /* MPLS carries UN address in next hop */
-      rfapiNexthop2Prefix (attr, p);
-      if (p->family != 0)
-        return 0;
+      return ENOENT;            /* no UN for MPLS */
     }
   if (attr && attr->extra)
     {
index fe9b8a3f50bd2705b4fb747b5d46c549cc9f69a1..572ca7f0a6b1e8254453f374affe0c4e6c8682ee 100644 (file)
@@ -490,14 +490,7 @@ rfapi_vty_out_vncinfo (
   if (bi->extra != NULL)
     vty_out (vty, " label=%u", decode_label (bi->extra->tag));
 
-  if (rfapiGetVncLifetime (bi->attr, &lifetime))
-    {
-      if (safi == SAFI_MPLS_VPN || safi == SAFI_ENCAP)
-        {
-          vty_out (vty, " life=none");
-        }
-    }
-  else
+  if (!rfapiGetVncLifetime (bi->attr, &lifetime))
     {
       vty_out (vty, " life=%d", lifetime);
     }