Commit c6faca91 authored by Ondrej Zajicek (work)'s avatar Ondrej Zajicek (work)
Browse files

OSPF: Add LSA retransmission counter

parent c217fe59
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1397,6 +1397,13 @@ ospf_iface_info(struct ospf_iface *ifa)
    cli_msg(-1015, "\tBackup designated router (IP): %I", ifa->bdrip);
  }

  uint lsrt_count = 0;
  struct ospf_neighbor *n;
  WALK_LIST(n, ifa->neigh_list)
    lsrt_count += n->lsrt_count;
  cli_msg(-1015, "\tTotal LSA retransmission list length: %u", lsrt_count);

  cli_msg(-1015, "\tStatistics:");
  ospf_iface_stats(-1015, &ifa->stats);

}
+4 −1
Original line number Diff line number Diff line
@@ -129,8 +129,9 @@ ospf_lsa_lsrt_up(struct top_hash_entry *en, struct ospf_neighbor *n)

  if (!SNODE_VALID(ret))
  {
    en->ret_count++;
    s_add_tail(&n->lsrtl, SNODE ret);
    n->lsrt_count++;
    en->ret_count++;
  }

  ret->lsa = en->lsa;
@@ -148,6 +149,7 @@ ospf_lsa_lsrt_down_(struct top_hash_entry *en, struct ospf_neighbor *n, struct t

  s_rem_node(SNODE ret);
  ospf_hash_delete(n->lsrth, ret);
  n->lsrt_count--;

  if (EMPTY_SLIST(n->lsrtl))
    tm_stop(n->lsrt_timer);
@@ -450,6 +452,7 @@ ospf_rxmt_lsupd(struct ospf_proto *p, struct ospf_neighbor *n)

      s_rem_node(SNODE ret);
      ospf_hash_delete(n->lsrth, ret);
      n->lsrt_count--;

      continue;
    }
+1 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ init_lists(struct ospf_proto *p, struct ospf_neighbor *n)

  s_init_list(&(n->lsrtl));
  n->lsrth = ospf_top_new(p, n->pool);
  n->lsrt_count = 0;
}

static void
+1 −0
Original line number Diff line number Diff line
@@ -390,6 +390,7 @@ struct ospf_neighbor
   */
  slist lsrtl;			/* slist of struct top_hash_entry from n->lsrth */
  struct top_graph *lsrth;
  u32 lsrt_count;		/* Number of entries in Link state retransmission list */
  timer *dbdes_timer;		/* DBDES exchange timer */
  timer *lsrq_timer;		/* LSA request timer */
  timer *lsrt_timer;		/* LSA retransmission timer */