summaryrefslogtreecommitdiff
path: root/ospfd/ospf_nsm.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2016-09-21 22:11:53 +0000
committerQuentin Young <qlyoung@cumulusnetworks.com>2016-09-21 22:11:53 +0000
commit844ec28cee41395cdd1cc0cdf8cf0168f9dc1adf (patch)
treef2fe0a9a71bb075a5f6f43cd992b89f46b95574f /ospfd/ospf_nsm.c
parentd0bfb22c223d645e554290ca82581eb06f94ac3b (diff)
parent039dc61292de5f3ed5f46316b1940ab6bb184c3f (diff)
Merge branch 'cmaster-next' into vtysh-grammar
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com> Conflicts: lib/.gitignore lib/command.c lib/command.h
Diffstat (limited to 'ospfd/ospf_nsm.c')
-rw-r--r--ospfd/ospf_nsm.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/ospfd/ospf_nsm.c b/ospfd/ospf_nsm.c
index 23d1e3fc6c..c6b55b0746 100644
--- a/ospfd/ospf_nsm.c
+++ b/ospfd/ospf_nsm.c
@@ -222,7 +222,6 @@ ospf_db_summary_isempty (struct ospf_neighbor *nbr)
static int
ospf_db_summary_add (struct ospf_neighbor *nbr, struct ospf_lsa *lsa)
{
-#ifdef HAVE_OPAQUE_LSA
switch (lsa->data->type)
{
case OSPF_OPAQUE_LINK_LSA:
@@ -240,7 +239,6 @@ ospf_db_summary_add (struct ospf_neighbor *nbr, struct ospf_lsa *lsa)
default:
break;
}
-#endif /* HAVE_OPAQUE_LSA */
/* Stay away from any Local Translated Type-7 LSAs */
if (CHECK_FLAG (lsa->flags, OSPF_LSA_LOCAL_XLT))
@@ -299,7 +297,6 @@ nsm_negotiation_done (struct ospf_neighbor *nbr)
LSDB_LOOP (ASBR_SUMMARY_LSDB (area), rn, lsa)
ospf_db_summary_add (nbr, lsa);
-#ifdef HAVE_OPAQUE_LSA
/* Process only if the neighbor is opaque capable. */
if (CHECK_FLAG (nbr->options, OSPF_OPTION_O))
{
@@ -308,7 +305,6 @@ nsm_negotiation_done (struct ospf_neighbor *nbr)
LSDB_LOOP (OPAQUE_AREA_LSDB (area), rn, lsa)
ospf_db_summary_add (nbr, lsa);
}
-#endif /* HAVE_OPAQUE_LSA */
if (CHECK_FLAG (nbr->options, OSPF_OPTION_NP))
{
@@ -321,13 +317,11 @@ nsm_negotiation_done (struct ospf_neighbor *nbr)
LSDB_LOOP (EXTERNAL_LSDB (nbr->oi->ospf), rn, lsa)
ospf_db_summary_add (nbr, lsa);
-#ifdef HAVE_OPAQUE_LSA
if (CHECK_FLAG (nbr->options, OSPF_OPTION_O)
&& (nbr->oi->type != OSPF_IFTYPE_VIRTUALLINK
&& area->external_routing == OSPF_AREA_DEFAULT))
LSDB_LOOP (OPAQUE_AS_LSDB (nbr->oi->ospf), rn, lsa)
ospf_db_summary_add (nbr, lsa);
-#endif /* HAVE_OPAQUE_LSA */
return 0;
}
@@ -383,10 +377,8 @@ nsm_clear_adj (struct ospf_neighbor *nbr)
if (!ospf_ls_retransmit_isempty (nbr))
ospf_ls_retransmit_clear (nbr);
-#ifdef HAVE_OPAQUE_LSA
if (CHECK_FLAG (nbr->options, OSPF_OPTION_O))
UNSET_FLAG (nbr->options, OSPF_OPTION_O);
-#endif /* HAVE_OPAQUE_LSA */
}
static int
@@ -768,9 +760,7 @@ nsm_change_state (struct ospf_neighbor *nbr, int state)
}
}
-#ifdef HAVE_OPAQUE_LSA
ospf_opaque_nsm_change (nbr, old_state);
-#endif /* HAVE_OPAQUE_LSA */
/* State changes from > ExStart to <= ExStart should clear any Exchange
* or Full/LSA Update related lists and state.
@@ -783,7 +773,7 @@ nsm_change_state (struct ospf_neighbor *nbr, int state)
if (state == NSM_ExStart)
{
if (nbr->dd_seqnum == 0)
- nbr->dd_seqnum = quagga_time (NULL);
+ nbr->dd_seqnum = (uint32_t)random ();
else
nbr->dd_seqnum++;