]> git.puffer.fish Git - matthieu/frr.git/commitdiff
some rfapi compile fixes
authorDaniel Walton <dwalton@cumulusnetworks.com>
Wed, 5 Oct 2016 20:54:55 +0000 (20:54 +0000)
committerDaniel Walton <dwalton@cumulusnetworks.com>
Wed, 5 Oct 2016 20:54:55 +0000 (20:54 +0000)
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
bgpd/bgp_attr.c
bgpd/bgp_mplsvpn.c
bgpd/rfapi/.gitignore [new file with mode: 0644]
bgpd/rfapi/rfapi.c
bgpd/rfapi/rfapi_import.c
bgpd/rfapi/rfapi_rib.c
bgpd/rfapi/rfapi_vty.c
bgpd/rfapi/vnc_import_bgp.c
bgpd/rfapi/vnc_zebra.c

index f5daf607e634ff412890191406a9a4c188417be2..b1388d0c4eb34a5716bd9879a78021d950f5fee6 100644 (file)
@@ -1952,7 +1952,7 @@ bgp_attr_encap(
   bgp_size_t                   total;
   struct attr_extra            *attre = NULL;
   struct bgp_attr_encap_subtlv *stlv_last = NULL;
-  uint16_t                     tunneltype;
+  uint16_t                     tunneltype = 0;
 
   total = length + (CHECK_FLAG (flag, BGP_ATTR_FLAG_EXTLEN) ? 4 : 3);
 
index e3e28c7a0f50304b3e7272f94ce9390baaa3dc73..2fc5d28087730afad134c02f89f11bf59465f51d 100644 (file)
@@ -125,7 +125,7 @@ decode_rd_ip (u_char *pnt, struct rd_ip *rd_ip)
 
 #if ENABLE_BGP_VNC
 /* type == RD_TYPE_VNC_ETH */
-void
+static void
 decode_rd_vnc_eth (u_char *pnt, struct rd_vnc_eth *rd_vnc_eth)
 {
   rd_vnc_eth->type = RD_TYPE_VNC_ETH;
diff --git a/bgpd/rfapi/.gitignore b/bgpd/rfapi/.gitignore
new file mode 100644 (file)
index 0000000..0638d75
--- /dev/null
@@ -0,0 +1 @@
+.dirstamp
index e33c33aa761367d0baf17f8ba9bba8d4e98b3780..3e292716dedb6998782034da6d85d08742b3ff05 100644 (file)
@@ -1873,7 +1873,6 @@ rfapi_open_rfd (struct rfapi_descriptor *rfd, struct bgp *bgp)
   struct rfapi_nve_group_cfg *rfg;
   struct rfapi *h;
   struct rfapi_cfg *hc;
-  struct prefix_rd prd;
   int rc;
 
   h = bgp->rfapi;
@@ -1914,14 +1913,6 @@ rfapi_open_rfd (struct rfapi_descriptor *rfd, struct bgp *bgp)
       return rc;
     }
 
-
-  /*
-   * Construct route distinguisher for VPN routes
-   */
-  prd = rfd->rd;
-  prd.family = AF_UNSPEC;
-  prd.prefixlen = 64;
-
   /*
    * re-advertise registered routes, this time as part of new NVE-group
    */
@@ -2316,7 +2307,6 @@ rfapi_close (void *handle)
   struct route_node *node;
   struct bgp *bgp;
   struct rfapi *h;
-  struct rfapi_cfg *hc;
 
   zlog_debug ("%s: rfd=%p", __func__, rfd);
 
@@ -2366,8 +2356,6 @@ rfapi_close (void *handle)
       return 0;
     }
 
-  hc = bgp->rfapi_cfg;
-
   if (CHECK_FLAG (rfd->flags, RFAPI_HD_FLAG_CLOSING_ADMINISTRATIVELY))
     {
 
@@ -2478,7 +2466,6 @@ int
 rfapi_reopen (struct rfapi_descriptor *rfd, struct bgp *bgp)
 {
   struct rfapi *h;
-  struct rfapi_cfg *hc;
   int rc;
 
   if ((rc = rfapi_close_inner (rfd, bgp)))
@@ -2489,7 +2476,6 @@ rfapi_reopen (struct rfapi_descriptor *rfd, struct bgp *bgp)
     {
 
       h = bgp->rfapi;
-      hc = bgp->rfapi_cfg;
 
       assert (!CHECK_FLAG (h->flags, RFAPI_INCALLBACK));
 
@@ -2538,7 +2524,6 @@ rfapi_register (
   uint32_t                     *label = NULL;
   struct rfapi_vn_option       *vo;
   struct rfapi_l2address_option        *l2o = NULL;
-  struct rfapi_nexthop         *lnh = NULL;
   struct prefix_rd             *prd_override = NULL;
 
   switch (action)
@@ -2566,10 +2551,6 @@ rfapi_register (
         {
           l2o = &vo->v.l2addr;
         }
-      if (RFAPI_VN_OPTION_TYPE_LOCAL_NEXTHOP == vo->type)
-        {
-          lnh = &vo->v.local_nexthop;
-        }
       if (RFAPI_VN_OPTION_TYPE_INTERNAL_RD == vo->type)
         {
           prd_override = &vo->v.internal_rd;
index 110182a1fcd35434f91f46c42c62197748fee590..8783024f168a6e916ba4e133f679376097ae4c7b 100644 (file)
@@ -3731,8 +3731,6 @@ rfapiBgpInfoFilteredImportVPN (
             }
           else
             {
-              int washolddown = 0;
-
               zlog_debug ("%s: %s at prefix %s/%d",
                           __func__,
                           ((action ==
@@ -3757,8 +3755,6 @@ rfapiBgpInfoFilteredImportVPN (
 
                   import_table->holddown_count[afi] -= 1;
                   RFAPI_UPDATE_ITABLE_COUNT (bi, import_table, afi, 1);
-
-                  washolddown = 1;
                 }
               /*
                * decrement remote count (if route is remote) because
index 48c2d422d9a9c6cad3d0e8ec2408dcab9ffe6f3c..62ffd7b8201928193686983a7ccb47052fc8893a 100644 (file)
@@ -1069,12 +1069,8 @@ process_pending_node (
                * then remove from pending list because the route
                * hasn't changed.
                */
-              int same = 0;
               if (!rfapi_info_cmp (ori, ri))
                 {
-                  /* same: delete from pending list */
-                  same = 1;
-
                   skiplist_delete (slPendPt, &ri->rk, NULL);
                   assert (lPendCost);
                   if (lPendCost)
index 0cb6f31ac14f643856f4f0d58de04d01a480f4d3..3c76bb422343e857f8b827195d494f274b461b5d 100644 (file)
@@ -1142,9 +1142,6 @@ rfapiPrintRemoteRegBi (
   struct vty *vty;
   void *out;
   const char *vty_newline;
-
-  uint32_t factor;
-
   struct prefix pfx_un;
   struct prefix pfx_vn;
   uint8_t cost;
@@ -1158,12 +1155,6 @@ rfapiPrintRemoteRegBi (
   char buf_lifetime[BUFSIZ];
   int nlines = 0;
 
-  if (bgp && bgp->rfapi_cfg)
-    factor = bgp->rfapi_cfg->rfp_cfg.holddown_factor;
-  else
-    factor = RFAPI_RFP_CFG_DEFAULT_HOLDDOWN_FACTOR;
-
-
   if (!stream)
     return 0;                   /* for debug log, print into buf & call output once */
 
index 79ef92e1f5a48c72cf763ddc47c0e0d627a8831e..99ec9efb264136264d5a677cdf873afc34814ff6 100644 (file)
@@ -952,7 +952,6 @@ vnc_import_bgp_add_route_mode_nvegroup (struct bgp *bgp,
   struct prefix_rd prd;
   struct route_map *rmap = NULL;
   uint32_t local_pref;
-  uint32_t *med = NULL;
 
   {
     char buf[BUFSIZ];
@@ -1120,12 +1119,6 @@ vnc_import_bgp_add_route_mode_nvegroup (struct bgp *bgp,
 
   local_pref = calc_local_pref (iattr, peer);
 
-  if (iattr && (iattr->flag & ATTR_FLAG_BIT (BGP_ATTR_MULTI_EXIT_DISC)))
-    {
-
-      med = &iattr->med;
-    }
-
   if (VNC_DEBUG(IMPORT_BGP_ADD_ROUTE))
     {
       char buf[BUFSIZ];
@@ -1334,9 +1327,6 @@ vnc_import_bgp_del_route_mode_resolve_nve_one_bi (
     struct prefix      *prefix)/* unicast route prefix */
 {
   struct prefix un;
-  uint32_t lifetime;
-  uint32_t *plifetime;
-  struct bgp_attr_encap_subtlv *encaptlvs;
 
   if (bi->type != ZEBRA_ROUTE_BGP && bi->type != ZEBRA_ROUTE_BGP_DIRECT)
     {
@@ -1363,24 +1353,6 @@ vnc_import_bgp_del_route_mode_resolve_nve_one_bi (
       memset (&vncHDResolveNve.un_addr, 0, sizeof (vncHDResolveNve.un_addr));
     }
 
-  if (rfapiGetVncLifetime (bi->attr, &lifetime))
-    {
-      plifetime = NULL;
-    }
-  else
-    {
-      plifetime = &lifetime;
-    }
-
-  if (bi->attr && bi->attr->extra)
-    {
-      encaptlvs = bi->attr->extra->vnc_subtlvs;
-    }
-  else
-    {
-      encaptlvs = NULL;
-    }
-
   del_vnc_route (&vncHDResolveNve, vncHDResolveNve.peer, bgp, SAFI_MPLS_VPN, prefix,    /* unicast route prefix */
                  prd, ZEBRA_ROUTE_BGP_DIRECT, BGP_ROUTE_REDISTRIBUTE, NULL, 0); /* flags */
 
index 0ea0fa9e509178a46c05e8c65981fe49ddc9add6..e357ef6eff273103d6b2edb4210063adc98c660a 100644 (file)
@@ -348,12 +348,10 @@ vnc_zebra_read_ipv4 (
 {
   struct stream *s;
   struct zapi_ipv4 api;
-  unsigned long ifindex;
   struct in_addr nexthop;
   struct prefix_ipv4 p;
 
   s = zclient->ibuf;
-  ifindex = 0;
   nexthop.s_addr = 0;
 
   /* Type, flags, message. */
@@ -376,7 +374,7 @@ vnc_zebra_read_ipv4 (
   if (CHECK_FLAG (api.message, ZAPI_MESSAGE_IFINDEX))
     {
       api.ifindex_num = stream_getc (s);
-      ifindex = stream_getl (s);
+      stream_getl (s);
     }
   if (CHECK_FLAG (api.message, ZAPI_MESSAGE_DISTANCE))
     api.distance = stream_getc (s);
@@ -433,12 +431,10 @@ vnc_zebra_read_ipv6 (
 {
   struct stream *s;
   struct zapi_ipv6 api;
-  unsigned long ifindex;
   struct in6_addr nexthop;
   struct prefix_ipv6 p;
 
   s = zclient->ibuf;
-  ifindex = 0;
   memset (&nexthop, 0, sizeof (struct in6_addr));
 
   /* Type, flags, message. */
@@ -461,7 +457,7 @@ vnc_zebra_read_ipv6 (
   if (CHECK_FLAG (api.message, ZAPI_MESSAGE_IFINDEX))
     {
       api.ifindex_num = stream_getc (s);
-      ifindex = stream_getl (s);
+      stream_getl (s);
     }
   if (CHECK_FLAG (api.message, ZAPI_MESSAGE_DISTANCE))
     api.distance = stream_getc (s);