]> git.puffer.fish 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>
Wed, 18 Jan 2017 23:26:52 +0000 (18:26 -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 6d86d48b6e938391304dd70a277409a239aec5aa..61da18a3084db6d33513a8ea01208a4d1f07828b 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 716a1fb537416c1af349c45ea0155e6784e4c770..26325b5816ff2604fc50fb3e4ed0e686dffe38ee 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 d96225d405f7ce9ce931502bbca878fb23e8d8c6..3e179b7f7283241e2f625212144c4dd7f6e5123c 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);
     }