]> git.puffer.fish Git - matthieu/frr.git/commitdiff
isisd: isisd-warnings.patch
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 20 May 2015 01:29:15 +0000 (18:29 -0700)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 20 May 2015 01:29:15 +0000 (18:29 -0700)
Remove compile warnings for the isisd directory
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by:

isisd/isis_circuit.c
isisd/isis_circuit.h
isisd/isis_pdu.c
isisd/isis_pfpacket.c
isisd/isis_spf.c
isisd/isis_tlv.c
isisd/isis_zebra.c
isisd/isisd.c
isisd/isisd.h
isisd/topology/spgrid.c

index 3d9fb47390b9334e67e34ceb0ddf1f18f830824f..4f7e2ce9ce34317127dd0a5d45e2e69cd1ba0ea0 100644 (file)
@@ -1342,7 +1342,6 @@ DEFUN (no_ipv6_router_isis,
 {
   struct interface *ifp;
   struct isis_area *area;
-  struct listnode *node;
   struct isis_circuit *circuit;
 
   ifp = (struct interface *) vty->index;
index 7ed481dc2ed76b30653d37e35b6c338d19428409..d86fee040eb6b40a5c467fcf26bd9e039217de20 100644 (file)
@@ -23,6 +23,8 @@
 #ifndef ISIS_CIRCUIT_H
 #define ISIS_CIRCUIT_H
 
+#include "vty.h"
+
 #define CIRCUIT_MAX 255
 
 struct password
index e0208fa47fbd068b842601c2646a826fd1711dc9..e783293a069b9ef2ca281ac9862fd6e074f58b2a 100644 (file)
@@ -1963,89 +1963,6 @@ process_psnp (int level, struct isis_circuit *circuit, u_char * ssnpa)
   return process_snp (ISIS_SNP_PSNP_FLAG, level, circuit, ssnpa);
 }
 
-/*
- * Process ISH
- * ISO - 10589
- * Section 8.2.2 - Receiving ISH PDUs by an intermediate system
- * FIXME: sample packet dump, need to figure 0x81 - looks like NLPid
- *           0x82      0x15    0x01    0x00    0x04    0x01    0x2c    0x59
- *           0x38      0x08    0x47    0x00    0x01    0x00    0x02    0x00
- *           0x03      0x00    0x81    0x01    0xcc
- */
-static int
-process_is_hello (struct isis_circuit *circuit)
-{
-  struct isis_adjacency *adj;
-  int retval = ISIS_OK;
-  u_char neigh_len;
-  u_char *sysid;
-
-  if (isis->debugs & DEBUG_ADJ_PACKETS)
-    {
-      zlog_debug ("ISIS-Adj (%s): Rcvd ISH on %s, cirType %s, cirID %u",
-                  circuit->area->area_tag, circuit->interface->name,
-                  circuit_t2string (circuit->is_type), circuit->circuit_id);
-      if (isis->debugs & DEBUG_PACKET_DUMP)
-        zlog_dump_data (STREAM_DATA (circuit->rcv_stream),
-                        stream_get_endp (circuit->rcv_stream));
-    }
-
-  /* In this point in time we are not yet able to handle is_hellos
-   * on lan - Sorry juniper...
-   */
-  if (circuit->circ_type == CIRCUIT_T_BROADCAST)
-    return retval;
-
-  neigh_len = stream_getc (circuit->rcv_stream);
-  sysid = STREAM_PNT (circuit->rcv_stream) + neigh_len - 1 - ISIS_SYS_ID_LEN;
-  adj = circuit->u.p2p.neighbor;
-  if (!adj)
-    {
-      /* 8.2.2 */
-      adj = isis_new_adj (sysid, NULL, 0, circuit);
-      if (adj == NULL)
-       return ISIS_ERROR;
-
-      isis_adj_state_change (adj, ISIS_ADJ_INITIALIZING, NULL);
-      adj->sys_type = ISIS_SYSTYPE_UNKNOWN;
-      circuit->u.p2p.neighbor = adj;
-    }
-  /* 8.2.2 a) */
-  if ((adj->adj_state == ISIS_ADJ_UP) && memcmp (adj->sysid, sysid,
-                                                ISIS_SYS_ID_LEN))
-    {
-      /* 8.2.2 a) 1) FIXME: adjStateChange(down) event */
-      /* 8.2.2 a) 2) delete the adj */
-      XFREE (MTYPE_ISIS_ADJACENCY, adj);
-      /* 8.2.2 a) 3) create a new adj */
-      adj = isis_new_adj (sysid, NULL, 0, circuit);
-      if (adj == NULL)
-       return ISIS_ERROR;
-
-      /* 8.2.2 a) 3) i */
-      isis_adj_state_change (adj, ISIS_ADJ_INITIALIZING, NULL);
-      /* 8.2.2 a) 3) ii */
-      adj->sys_type = ISIS_SYSTYPE_UNKNOWN;
-      /* 8.2.2 a) 4) quite meaningless */
-    }
-  /* 8.2.2 b) ignore on condition */
-  if ((adj->adj_state == ISIS_ADJ_INITIALIZING) &&
-      (adj->sys_type == ISIS_SYSTYPE_IS))
-    {
-      /* do nothing */
-    }
-  else
-    {
-      /* 8.2.2 c) respond with a p2p IIH */
-      send_hello (circuit, 1);
-    }
-  /* 8.2.2 d) type is IS */
-  adj->sys_type = ISIS_SYSTYPE_IS;
-  /* 8.2.2 e) FIXME: Circuit type of? */
-
-  return retval;
-}
-
 /*
  * PDU Dispatcher
  */
index 4bc8717a9b2d93728a2ca22fe341adb06ed964c4..d91d9888585b02ff26c424525fb92d2b1c7fb800 100644 (file)
@@ -323,7 +323,6 @@ isis_send_pdu_bcast (struct isis_circuit *circuit, int level)
   /* we need to do the LLC in here because of P2P circuits, which will
    * not need it
    */
-  int written = 1;
   struct sockaddr_ll sa;
 
   stream_set_getp (circuit->snd_stream, 0);
@@ -356,7 +355,7 @@ isis_send_pdu_bcast (struct isis_circuit *circuit, int level)
   iov[1].iov_base = circuit->snd_stream->data;
   iov[1].iov_len = stream_get_endp (circuit->snd_stream);
 
-  written = sendmsg (circuit->fd, &msg, 0);
+  sendmsg (circuit->fd, &msg, 0);
 
   return ISIS_OK;
 }
@@ -364,7 +363,6 @@ isis_send_pdu_bcast (struct isis_circuit *circuit, int level)
 int
 isis_send_pdu_p2p (struct isis_circuit *circuit, int level)
 {
-  int written = 1;
   struct sockaddr_ll sa;
 
   stream_set_getp (circuit->snd_stream, 0);
@@ -381,10 +379,10 @@ isis_send_pdu_p2p (struct isis_circuit *circuit, int level)
 
   /* lets try correcting the protocol */
   sa.sll_protocol = htons (0x00FE);
-  written = sendto (circuit->fd, circuit->snd_stream->data,
-                   stream_get_endp (circuit->snd_stream), 0, 
-                   (struct sockaddr *) &sa,
-                   sizeof (struct sockaddr_ll));
+  sendto (circuit->fd, circuit->snd_stream->data,
+         stream_get_endp (circuit->snd_stream), 0, 
+         (struct sockaddr *) &sa,
+         sizeof (struct sockaddr_ll));
 
   return ISIS_OK;
 }
index fd93efa6592178f974e59be18ce1cd8ab878d782..0d2ebaf3bc5c5b7fb20c9e68fd982231fa7284a3 100644 (file)
@@ -1456,8 +1456,8 @@ isis_spf_schedule6 (struct isis_area *area, int level)
   assert (area->is_type & level);
 
   if (isis->debugs & DEBUG_SPF_EVENTS)
-    zlog_debug ("ISIS-Spf (%s) L%d SPF schedule called, lastrun %d sec ago",
-                area->area_tag, level, diff);
+    zlog_debug ("ISIS-Spf (%s) L%d SPF schedule called, lastrun %lld sec ago",
+                area->area_tag, level, (long long)diff);
 
   if (spftree->pending)
     return ISIS_OK;
@@ -1476,8 +1476,8 @@ isis_spf_schedule6 (struct isis_area *area, int level)
                      area->min_spf_interval[1] - diff);
 
   if (isis->debugs & DEBUG_SPF_EVENTS)
-    zlog_debug ("ISIS-Spf (%s) L%d SPF scheduled %d sec from now",
-                area->area_tag, level, area->min_spf_interval[level-1] - diff);
+    zlog_debug ("ISIS-Spf (%s) L%d SPF scheduled %lld sec from now",
+                area->area_tag, level, (long long)(area->min_spf_interval[level-1] - diff));
 
   spftree->pending = 1;
 
index bbfa5d812a55200c1fcfec9e881da0ed5d31ae4e..848cc6ee366e064ab415cc03f9ed7cadfa6fd131 100644 (file)
@@ -115,7 +115,6 @@ parse_tlvs (char *areatag, u_char * stream, int size, u_int32_t * expected,
   struct ipv6_reachability *ipv6_reach;
   int prefix_octets;
 #endif /* HAVE_IPV6 */
-  u_char virtual;
   int value_len, retval = ISIS_OK;
   u_char *start = stream, *pnt = stream, *endpnt;
 
@@ -179,7 +178,6 @@ parse_tlvs (char *areatag, u_char * stream, int size, u_int32_t * expected,
               * |                        Virtual Flag                           | 
               * +-------+-------+-------+-------+-------+-------+-------+-------+
               */
-             virtual = *pnt;   /* FIXME: what is the use for this? */
              pnt++;
              value_len++;
              /* +-------+-------+-------+-------+-------+-------+-------+-------+
@@ -926,7 +924,6 @@ tlv_add_ip_addrs (struct list *ip_addrs, struct stream *stream)
   struct prefix_ipv4 *ipv4;
   u_char value[255];
   u_char *pos = value;
-  int retval;
 
   for (ALL_LIST_ELEMENTS_RO (ip_addrs, node, ipv4))
     {
index 8d457c462ae6aee3b145fb7c9f25b83a8439a104..5522b378e1994fb1ae1d9ca0bd3a8c4c9dc89f29 100644 (file)
@@ -321,7 +321,7 @@ isis_zebra_route_del_ipv4 (struct prefix *prefix,
 }
 
 #ifdef HAVE_IPV6
-void
+static void
 isis_zebra_route_add_ipv6 (struct prefix *prefix,
                           struct isis_route_info *route_info)
 {
@@ -525,12 +525,9 @@ isis_zebra_read_ipv4 (int command, struct zclient *zclient,
   struct stream *stream;
   struct zapi_ipv4 api;
   struct prefix_ipv4 p;
-  unsigned long ifindex;
-  struct in_addr nexthop;
 
   stream = zclient->ibuf;
   memset (&p, 0, sizeof (struct prefix_ipv4));
-  ifindex = 0;
 
   api.type = stream_getc (stream);
   api.instance = stream_getw (stream);
@@ -544,12 +541,12 @@ isis_zebra_read_ipv4 (int command, struct zclient *zclient,
   if (CHECK_FLAG (api.message, ZAPI_MESSAGE_NEXTHOP))
     {
       api.nexthop_num = stream_getc (stream);
-      nexthop.s_addr = stream_get_ipv4 (stream);
+      (void)stream_get_ipv4 (stream);
     }
   if (CHECK_FLAG (api.message, ZAPI_MESSAGE_IFINDEX))
     {
       api.ifindex_num = stream_getc (stream);
-      ifindex = stream_getl (stream);
+      stream_getl (stream);
     }
   if (CHECK_FLAG (api.message, ZAPI_MESSAGE_DISTANCE))
     api.distance = stream_getc (stream);
index 12b51e3b6bf3f09b3b52b9f18dc0c921a81fcbc1..5c9076485518f8f6e062481471a8479185ab634d 100644 (file)
@@ -1298,7 +1298,7 @@ DEFUN (show_isis_summary,
       vty_out_timestr(vty, spftree->last_run_timestamp);
       vty_out (vty, "%s", VTY_NEWLINE);
 
-      vty_out (vty, "      last run duration : %u msec%s",
+      vty_out (vty, "      last run duration : %ld msec%s",
                spftree->last_run_duration, VTY_NEWLINE);
 
       vty_out (vty, "      run count         : %d%s",
index 5db485f47265b5899a91cd8c0b2636f141894d18..5038d317bb4d9c10ab3216a896f0ea121ff45dbc 100644 (file)
@@ -23,6 +23,8 @@
 #ifndef ISISD_H
 #define ISISD_H
 
+#include "vty.h"
+
 #define ISISD_VERSION "0.0.7"
 
 /* uncomment if you are a developer in bug hunt */
index 611b672799cace111ca528b85e5fa3cc76c0acde..df09d0b2b6a7fdc876311cc5577550eb1e877551 100644 (file)
@@ -50,8 +50,8 @@ long   X,   /* horizontal size of grid */
 
 long   x,
        y,
-       y1, y2, yp,
-       dl, dx, xn, yn, count,
+       ya1, y2, yp,
+       dl, dx, xn, yan, count,
        *mess;
 
 double n;
@@ -670,11 +670,11 @@ gen_spgrid_topology (struct vty *vty, struct list *topology)
 
     for ( k = ax; k > 0; k -- )
        {
-         y1 = nrand ( Y );
+         ya1 = nrand ( Y );
          do
             y2 = nrand ( Y );
-         while ( y2 == y1 );
-         i  = NODE ( x, y1 );
+         while ( y2 == ya1 );
+         i  = NODE ( x, ya1 );
          j  = NODE ( x, y2 );
          l = am + nrand ( al );
          print_arc (vty, topology,  i, j, l );
@@ -712,12 +712,12 @@ gen_spgrid_topology (struct vty *vty, struct list *topology)
          if ( ip_f )
            {
              yp = nrand(Y-y);
-             yn = mess[ yp ];
+             yan = mess[ yp ];
                 mess[ yp ] = mess[ Y - y - 1 ];
            }
          else
-               yn =  y;
-         j = NODE ( xn, yn );
+               yan =  y;
+         j = NODE ( xn, yan );
          l = im + nrand ( il );
          if ( in != 0 )
               l *= (long) ( in * dx );