]> git.puffer.fish Git - mirror/frr.git/commitdiff
ripd: #if 0 we know what you are up to.
authorDonald Sharp <sharpd@nvidia.com>
Thu, 28 Jan 2021 18:40:05 +0000 (13:40 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Thu, 28 Jan 2021 18:40:05 +0000 (13:40 -0500)
rip, ripped out the #if 0 code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
ripd/rip_interface.c
ripd/rip_snmp.c
ripd/ripd.c

index c601ab404737a8470bf125a5eaf36c75f6cc34c4..89e7e5dc17ef09fa4d0c7f78b3098fa962c212a0 100644 (file)
@@ -208,39 +208,6 @@ static void rip_request_interface(struct interface *ifp)
                rip_request_interface_send(ifp, RIPv2);
 }
 
-#if 0
-/* Send RIP request to the neighbor. */
-static void
-rip_request_neighbor (struct in_addr addr)
-{
-  struct sockaddr_in to;
-
-  memset (&to, 0, sizeof(struct sockaddr_in));
-  to.sin_port = htons (RIP_PORT_DEFAULT);
-  to.sin_addr = addr;
-
-  rip_request_send (&to, NULL, rip->version_send, NULL);
-}
-
-/* Request routes at all interfaces. */
-static void
-rip_request_neighbor_all (void)
-{
-  struct route_node *rp;
-
-  if (! rip)
-    return;
-
-  if (IS_RIP_DEBUG_EVENT)
-    zlog_debug ("request to the all neighbor");
-
-  /* Send request to all neighbor. */
-  for (rp = route_top (rip->neighbor); rp; rp = route_next (rp))
-    if (rp->info)
-      rip_request_neighbor (rp->p.u.prefix4);
-}
-#endif
-
 /* Multicast packet receive socket. */
 static int rip_multicast_join(struct interface *ifp, int sock)
 {
index be222c7a5fc5faa72d308a38973c69e428ee3a46..4e6ed1400fce1448f809ea4d40f0041454fc4ec7 100644 (file)
@@ -547,18 +547,7 @@ static uint8_t *rip2PeerTable(struct variable *v, oid name[], size_t *length,
                return (uint8_t *)&domain;
 
        case RIP2PEERLASTUPDATE:
-#if 0
-      /* We don't know the SNMP agent startup time. We have two choices here:
-       * - assume ripd startup time equals SNMP agent startup time
-       * - don't support this variable, at all
-       * Currently, we do the latter...
-       */
-      *val_len = sizeof(time_t);
-      uptime = peer->uptime; /* now - snmp_agent_startup - peer->uptime */
-      return (uint8_t *) &uptime;
-#else
                return (uint8_t *)NULL;
-#endif
 
        case RIP2PEERVERSION:
                *val_len = sizeof(int);
index 82dd401f96031f7203e63f87536a98b4b1a9172a..a276dedec8f526be09057b3c23d4d95439829f0b 100644 (file)
@@ -2858,23 +2858,6 @@ void rip_event(struct rip *rip, enum rip_event event, int sock)
        }
 }
 
-#if 0
-static void
-rip_update_default_metric (void)
-{
-  struct route_node *np;
-  struct rip_info *rinfo = NULL;
-  struct list *list = NULL;
-  struct listnode *listnode = NULL;
-
-  for (np = route_top (rip->table); np; np = route_next (np))
-    if ((list = np->info) != NULL)
-      for (ALL_LIST_ELEMENTS_RO (list, listnode, rinfo))
-        if (rinfo->type != ZEBRA_ROUTE_RIP && rinfo->type != ZEBRA_ROUTE_CONNECT)
-          rinfo->metric = rip->default_metric;
-}
-#endif
-
 struct rip_distance *rip_distance_new(void)
 {
        return XCALLOC(MTYPE_RIP_DISTANCE, sizeof(struct rip_distance));