forked from Mirror/frr
ospfd: Remove HAVE_OPAQUE_LSA
HAVE_OPAQUE_LSA is used by default and you have to actively turn it off except that OPAQUE_LSA is an industry standard and used pretty much everywhere. There is no need to have special #defines for this anymore. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> (cherry picked from commit 36fef5708d074a3ef41f34d324c309c45bae119b)
This commit is contained in:
parent
039f3a3495
commit
cd66cd4ce1
15
configure.ac
15
configure.ac
|
@ -265,8 +265,6 @@ AC_ARG_WITH(libpam,
|
|||
AS_HELP_STRING([--with-libpam], [use libpam for PAM support in vtysh]))
|
||||
AC_ARG_ENABLE(tcp-zebra,
|
||||
AS_HELP_STRING([--enable-tcp-zebra], [enable TCP/IP socket connection between zebra and protocol daemon]))
|
||||
AC_ARG_ENABLE(opaque-lsa,
|
||||
AS_HELP_STRING([--disable-opaque-lsa],[do not build OSPF Opaque-LSA with OSPFAPI support (RFC2370)]))
|
||||
AC_ARG_ENABLE(ospfapi,
|
||||
AS_HELP_STRING([--disable-ospfapi], [do not build OSPFAPI to access the OSPF LSA Database]))
|
||||
AC_ARG_ENABLE(ospfclient,
|
||||
|
@ -383,12 +381,7 @@ if test "${enable_tcp_zebra}" = "yes"; then
|
|||
AC_DEFINE(HAVE_TCP_ZEBRA,,Use TCP for zebra communication)
|
||||
fi
|
||||
|
||||
if test "${enable_opaque_lsa}" != "no"; then
|
||||
AC_DEFINE(HAVE_OPAQUE_LSA,,OSPF Opaque LSA)
|
||||
fi
|
||||
|
||||
if test "${enable_ospf_te}" != "no"; then
|
||||
AC_DEFINE(HAVE_OPAQUE_LSA,,OSPF Opaque LSA)
|
||||
AC_DEFINE(HAVE_OSPF_TE,,OSPF TE)
|
||||
fi
|
||||
|
||||
|
@ -1245,16 +1238,14 @@ fi
|
|||
AM_CONDITIONAL(WATCHQUAGGA, test "x$WATCHQUAGGA" = "xwatchquagga")
|
||||
|
||||
OSPFCLIENT=""
|
||||
if test "${enable_opaque_lsa}" != "no"; then
|
||||
if test "${enable_ospfapi}" != "no";then
|
||||
if test "${enable_ospfapi}" != "no";then
|
||||
AC_DEFINE(SUPPORT_OSPF_API,,OSPFAPI)
|
||||
|
||||
if test "${enable_ospfclient}" != "no";then
|
||||
if test "${enable_ospfclient}" != "no";then
|
||||
OSPFCLIENT="ospfclient"
|
||||
fi
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(OSPFCLIENT, test "x$OSPFCLIENT" = "xospfclient")
|
||||
|
||||
case "${enable_ripngd}" in
|
||||
|
|
|
@ -23,9 +23,6 @@
|
|||
#include <zebra.h>
|
||||
|
||||
#ifdef SUPPORT_OSPF_API
|
||||
#ifndef HAVE_OPAQUE_LSA
|
||||
#error "Core Opaque-LSA module must be configured."
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
#include "linklist.h"
|
||||
#include "prefix.h"
|
||||
|
|
|
@ -23,9 +23,6 @@
|
|||
#include <zebra.h>
|
||||
|
||||
#ifdef SUPPORT_OSPF_API
|
||||
#ifndef HAVE_OPAQUE_LSA
|
||||
#error "Core Opaque-LSA module must be configured."
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
#include "linklist.h"
|
||||
#include "prefix.h"
|
||||
|
|
|
@ -619,13 +619,11 @@ ospf_packet_ls_upd_dump (struct stream *s, u_int16_t length)
|
|||
case OSPF_AS_NSSA_LSA:
|
||||
ospf_as_external_lsa_dump (s, length);
|
||||
break;
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
case OSPF_OPAQUE_LINK_LSA:
|
||||
case OSPF_OPAQUE_AREA_LSA:
|
||||
case OSPF_OPAQUE_AS_LSA:
|
||||
ospf_opaque_lsa_dump (s, length);
|
||||
break;
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -156,9 +156,7 @@ ospf_process_self_originated_lsa (struct ospf *ospf,
|
|||
ospf_router_lsa_update_area (area);
|
||||
return;
|
||||
case OSPF_NETWORK_LSA:
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
case OSPF_OPAQUE_LINK_LSA:
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
/* We must find the interface the LSA could belong to.
|
||||
If the interface is no more a broadcast type or we are no more
|
||||
the DR, we flush the LSA otherwise -- create the new instance and
|
||||
|
@ -178,13 +176,11 @@ ospf_process_self_originated_lsa (struct ospf *ospf,
|
|||
return;
|
||||
}
|
||||
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
if (new->data->type == OSPF_OPAQUE_LINK_LSA)
|
||||
{
|
||||
ospf_opaque_lsa_refresh (new);
|
||||
return;
|
||||
}
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
if (oi->network_lsa_self)
|
||||
oi->network_lsa_self->data->ls_seqnum = new->data->ls_seqnum;
|
||||
|
@ -211,14 +207,12 @@ ospf_process_self_originated_lsa (struct ospf *ospf,
|
|||
else
|
||||
ospf_lsa_flush_as (ospf, new);
|
||||
break;
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
case OSPF_OPAQUE_AREA_LSA:
|
||||
ospf_opaque_lsa_refresh (new);
|
||||
break;
|
||||
case OSPF_OPAQUE_AS_LSA:
|
||||
ospf_opaque_lsa_refresh (new); /* Reconsideration may needed. *//* XXX */
|
||||
break;
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -299,25 +293,17 @@ ospf_flood (struct ospf *ospf, struct ospf_neighbor *nbr,
|
|||
interface. */
|
||||
lsa_ack_flag = ospf_flood_through (ospf, nbr, new);
|
||||
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
/* Remove the current database copy from all neighbors' Link state
|
||||
retransmission lists. AS_EXTERNAL and AS_EXTERNAL_OPAQUE does
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
not have area ID.
|
||||
All other (even NSSA's) do have area ID. */
|
||||
#else /* HAVE_OPAQUE_LSA */
|
||||
/* Remove the current database copy from all neighbors' Link state
|
||||
retransmission lists. Only AS_EXTERNAL does not have area ID.
|
||||
All other (even NSSA's) do have area ID. */
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
if (current)
|
||||
{
|
||||
switch (current->data->type)
|
||||
{
|
||||
case OSPF_AS_EXTERNAL_LSA:
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
case OSPF_OPAQUE_AS_LSA:
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
ospf_ls_retransmit_delete_nbr_as (ospf, current);
|
||||
break;
|
||||
default:
|
||||
|
@ -439,7 +425,6 @@ ospf_flood_through_interface (struct ospf_interface *oi,
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
if (IS_OPAQUE_LSA (lsa->data->type))
|
||||
{
|
||||
if (! CHECK_FLAG (onbr->options, OSPF_OPTION_O))
|
||||
|
@ -449,7 +434,6 @@ ospf_flood_through_interface (struct ospf_interface *oi,
|
|||
continue;
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
/* If the new LSA was received from this neighbor,
|
||||
examine the next neighbor. */
|
||||
|
@ -584,7 +568,6 @@ ospf_flood_through_area (struct ospf_area *area,
|
|||
oi->type == OSPF_IFTYPE_VIRTUALLINK)
|
||||
continue;
|
||||
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
if ((lsa->data->type == OSPF_OPAQUE_LINK_LSA) && (lsa->oi != oi))
|
||||
{
|
||||
/*
|
||||
|
@ -596,7 +579,6 @@ ospf_flood_through_area (struct ospf_area *area,
|
|||
(void *)lsa->oi, (void *)oi);
|
||||
continue;
|
||||
}
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
if (ospf_flood_through_interface (oi, inbr, lsa))
|
||||
lsa_ack_flag = 1;
|
||||
|
@ -706,16 +688,12 @@ ospf_flood_through (struct ospf *ospf,
|
|||
case OSPF_NETWORK_LSA:
|
||||
case OSPF_SUMMARY_LSA:
|
||||
case OSPF_ASBR_SUMMARY_LSA:
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
case OSPF_OPAQUE_LINK_LSA: /* ospf_flood_through_interface ? */
|
||||
case OSPF_OPAQUE_AREA_LSA:
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
lsa_ack_flag = ospf_flood_through_area (inbr->oi->area, inbr, lsa);
|
||||
break;
|
||||
case OSPF_AS_EXTERNAL_LSA: /* Type-5 */
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
case OSPF_OPAQUE_AS_LSA:
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
lsa_ack_flag = ospf_flood_through_as (ospf, inbr, lsa);
|
||||
break;
|
||||
/* Type-7 Only received within NSSA, then flooded */
|
||||
|
@ -745,9 +723,7 @@ ospf_flood_through (struct ospf *ospf,
|
|||
switch (lsa->data->type)
|
||||
{
|
||||
case OSPF_AS_EXTERNAL_LSA: /* Type-5 */
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
case OSPF_OPAQUE_AS_LSA:
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
lsa_ack_flag = ospf_flood_through_as (ospf, inbr, lsa);
|
||||
break;
|
||||
/* Type-7 Only received within NSSA, then flooded */
|
||||
|
@ -1024,16 +1000,12 @@ ospf_lsa_flush (struct ospf *ospf, struct ospf_lsa *lsa)
|
|||
case OSPF_SUMMARY_LSA:
|
||||
case OSPF_ASBR_SUMMARY_LSA:
|
||||
case OSPF_AS_NSSA_LSA:
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
case OSPF_OPAQUE_LINK_LSA:
|
||||
case OSPF_OPAQUE_AREA_LSA:
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
ospf_lsa_flush_area (lsa, lsa->area);
|
||||
break;
|
||||
case OSPF_AS_EXTERNAL_LSA:
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
case OSPF_OPAQUE_AS_LSA:
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
ospf_lsa_flush_as (ospf, lsa);
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -243,9 +243,7 @@ ospf_if_new (struct ospf *ospf, struct interface *ifp, struct prefix *p)
|
|||
|
||||
oi->crypt_seqnum = time (NULL);
|
||||
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
ospf_opaque_type9_lsa_init (oi);
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
oi->ospf = ospf;
|
||||
|
||||
|
@ -307,9 +305,7 @@ ospf_if_free (struct ospf_interface *oi)
|
|||
|
||||
assert (oi->state == ISM_Down);
|
||||
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
ospf_opaque_type9_lsa_term (oi);
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
/* Free Pseudo Neighbour */
|
||||
ospf_nbr_delete (oi->nbr_self);
|
||||
|
@ -696,9 +692,7 @@ ospf_if_new_hook (struct interface *ifp)
|
|||
SET_IF_PARAM (IF_DEF_PARAMS (ifp), auth_type);
|
||||
IF_DEF_PARAMS (ifp)->auth_type = OSPF_AUTH_NOTSET;
|
||||
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
rc = ospf_opaque_new_if (ifp);
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -707,9 +701,7 @@ ospf_if_delete_hook (struct interface *ifp)
|
|||
{
|
||||
int rc = 0;
|
||||
struct route_node *rn;
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
rc = ospf_opaque_del_if (ifp);
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
route_table_finish (IF_OIFS (ifp));
|
||||
|
||||
|
|
|
@ -188,9 +188,7 @@ struct ospf_interface
|
|||
|
||||
/* self-originated LSAs. */
|
||||
struct ospf_lsa *network_lsa_self; /* network-LSA. */
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
struct list *opaque_lsa_self; /* Type-9 Opaque-LSAs */
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
struct route_table *ls_upd_queue;
|
||||
|
||||
|
@ -211,9 +209,7 @@ struct ospf_interface
|
|||
struct thread *t_ls_ack; /* timer */
|
||||
struct thread *t_ls_ack_direct; /* event */
|
||||
struct thread *t_ls_upd_event; /* event */
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
struct thread *t_opaque_lsa_self; /* Type-9 Opaque-LSAs */
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
int on_write_q;
|
||||
|
||||
|
|
|
@ -593,9 +593,7 @@ ism_change_state (struct ospf_interface *oi, int state)
|
|||
oi->network_lsa_self = NULL;
|
||||
}
|
||||
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
ospf_opaque_ism_change (oi, old_state);
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
/* Check area border status. */
|
||||
ospf_check_abr_status (oi->ospf);
|
||||
|
|
|
@ -2642,11 +2642,9 @@ ospf_discard_from_db (struct ospf *ospf,
|
|||
ospf_ase_unregister_external_lsa (old, ospf);
|
||||
ospf_ls_retransmit_delete_nbr_as (ospf, old);
|
||||
break;
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
case OSPF_OPAQUE_AS_LSA:
|
||||
ospf_ls_retransmit_delete_nbr_as (ospf, old);
|
||||
break;
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
case OSPF_AS_NSSA_LSA:
|
||||
ospf_ls_retransmit_delete_nbr_area (old->area, old);
|
||||
ospf_ase_unregister_external_lsa (old, ospf);
|
||||
|
@ -2680,9 +2678,7 @@ ospf_lsa_install (struct ospf *ospf, struct ospf_interface *oi,
|
|||
lsdb = ospf->lsdb;
|
||||
break;
|
||||
case OSPF_AS_EXTERNAL_LSA:
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
case OSPF_OPAQUE_AS_LSA:
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
lsdb = ospf->lsdb;
|
||||
break;
|
||||
default:
|
||||
|
@ -2794,7 +2790,6 @@ ospf_lsa_install (struct ospf *ospf, struct ospf_interface *oi,
|
|||
case OSPF_AS_EXTERNAL_LSA:
|
||||
new = ospf_external_lsa_install (ospf, lsa, rt_recalc);
|
||||
break;
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
case OSPF_OPAQUE_LINK_LSA:
|
||||
if (IS_LSA_SELF (lsa))
|
||||
lsa->oi = oi; /* Specify outgoing ospf-interface for this LSA. */
|
||||
|
@ -2807,7 +2802,6 @@ ospf_lsa_install (struct ospf *ospf, struct ospf_interface *oi,
|
|||
case OSPF_OPAQUE_AS_LSA:
|
||||
new = ospf_opaque_lsa_install (lsa, rt_recalc);
|
||||
break;
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
case OSPF_AS_NSSA_LSA:
|
||||
new = ospf_external_lsa_install (ospf, lsa, rt_recalc);
|
||||
default: /* type-6,8,9....nothing special */
|
||||
|
@ -2825,9 +2819,7 @@ ospf_lsa_install (struct ospf *ospf, struct ospf_interface *oi,
|
|||
switch (lsa->data->type)
|
||||
{
|
||||
case OSPF_AS_EXTERNAL_LSA:
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
case OSPF_OPAQUE_AS_LSA:
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
case OSPF_AS_NSSA_LSA:
|
||||
zlog_debug ("LSA[%s]: Install %s",
|
||||
dump_lsa_key (new),
|
||||
|
@ -3061,7 +3053,6 @@ ospf_lsa_maxage_walker_remover (struct ospf *ospf, struct ospf_lsa *lsa)
|
|||
|
||||
switch (lsa->data->type)
|
||||
{
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
case OSPF_OPAQUE_LINK_LSA:
|
||||
case OSPF_OPAQUE_AREA_LSA:
|
||||
case OSPF_OPAQUE_AS_LSA:
|
||||
|
@ -3074,7 +3065,6 @@ ospf_lsa_maxage_walker_remover (struct ospf *ospf, struct ospf_lsa *lsa)
|
|||
* topology, and thus, routing recalculation is not needed here.
|
||||
*/
|
||||
break;
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
case OSPF_AS_EXTERNAL_LSA:
|
||||
case OSPF_AS_NSSA_LSA:
|
||||
ospf_ase_incremental_update (ospf, lsa);
|
||||
|
@ -3115,12 +3105,10 @@ ospf_lsa_maxage_walker (struct thread *thread)
|
|||
ospf_lsa_maxage_walker_remover (ospf, lsa);
|
||||
LSDB_LOOP (ASBR_SUMMARY_LSDB (area), rn, lsa)
|
||||
ospf_lsa_maxage_walker_remover (ospf, lsa);
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
LSDB_LOOP (OPAQUE_AREA_LSDB (area), rn, lsa)
|
||||
ospf_lsa_maxage_walker_remover (ospf, lsa);
|
||||
LSDB_LOOP (OPAQUE_LINK_LSDB (area), rn, lsa)
|
||||
ospf_lsa_maxage_walker_remover (ospf, lsa);
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
LSDB_LOOP (NSSA_LSDB (area), rn, lsa)
|
||||
ospf_lsa_maxage_walker_remover (ospf, lsa);
|
||||
}
|
||||
|
@ -3130,10 +3118,8 @@ ospf_lsa_maxage_walker (struct thread *thread)
|
|||
{
|
||||
LSDB_LOOP (EXTERNAL_LSDB (ospf), rn, lsa)
|
||||
ospf_lsa_maxage_walker_remover (ospf, lsa);
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
LSDB_LOOP (OPAQUE_AS_LSDB (ospf), rn, lsa)
|
||||
ospf_lsa_maxage_walker_remover (ospf, lsa);
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
}
|
||||
|
||||
OSPF_TIMER_ON (ospf->t_maxage_walker, ospf_lsa_maxage_walker,
|
||||
|
@ -3186,15 +3172,11 @@ ospf_lsa_lookup (struct ospf_area *area, u_int32_t type,
|
|||
case OSPF_SUMMARY_LSA:
|
||||
case OSPF_ASBR_SUMMARY_LSA:
|
||||
case OSPF_AS_NSSA_LSA:
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
case OSPF_OPAQUE_LINK_LSA:
|
||||
case OSPF_OPAQUE_AREA_LSA:
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
return ospf_lsdb_lookup_by_id (area->lsdb, type, id, adv_router);
|
||||
case OSPF_AS_EXTERNAL_LSA:
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
case OSPF_OPAQUE_AS_LSA:
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
return ospf_lsdb_lookup_by_id (ospf->lsdb, type, id, adv_router);
|
||||
default:
|
||||
break;
|
||||
|
@ -3230,13 +3212,11 @@ ospf_lsa_lookup_by_id (struct ospf_area *area, u_int32_t type,
|
|||
return ospf_lsdb_lookup_by_id (area->lsdb, type, id, id);
|
||||
case OSPF_AS_EXTERNAL_LSA:
|
||||
case OSPF_AS_NSSA_LSA:
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
case OSPF_OPAQUE_LINK_LSA:
|
||||
case OSPF_OPAQUE_AREA_LSA:
|
||||
case OSPF_OPAQUE_AS_LSA:
|
||||
/* Currently not used. */
|
||||
break;
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -3249,14 +3229,12 @@ ospf_lsa_lookup_by_header (struct ospf_area *area, struct lsa_header *lsah)
|
|||
{
|
||||
struct ospf_lsa *match;
|
||||
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
/*
|
||||
* Strictly speaking, the LSA-ID field for Opaque-LSAs (type-9/10/11)
|
||||
* is redefined to have two subfields; opaque-type and opaque-id.
|
||||
* However, it is harmless to treat the two sub fields together, as if
|
||||
* they two were forming a unique LSA-ID.
|
||||
*/
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
match = ospf_lsa_lookup (area, lsah->type, lsah->id, lsah->adv_router);
|
||||
|
||||
|
@ -3407,14 +3385,12 @@ ospf_lsa_flush_schedule (struct ospf *ospf, struct ospf_lsa *lsa)
|
|||
|
||||
switch (lsa->data->type)
|
||||
{
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
/* Opaque wants to be notified of flushes */
|
||||
case OSPF_OPAQUE_LINK_LSA:
|
||||
case OSPF_OPAQUE_AREA_LSA:
|
||||
case OSPF_OPAQUE_AS_LSA:
|
||||
ospf_opaque_lsa_refresh (lsa);
|
||||
break;
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
default:
|
||||
ospf_refresher_unregister_lsa (ospf, lsa);
|
||||
ospf_lsa_flush (ospf, lsa);
|
||||
|
@ -3474,22 +3450,18 @@ ospf_flush_self_originated_lsas_now (struct ospf *ospf)
|
|||
ospf_lsa_flush_schedule (ospf, lsa);
|
||||
LSDB_LOOP (ASBR_SUMMARY_LSDB (area), rn, lsa)
|
||||
ospf_lsa_flush_schedule (ospf, lsa);
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
LSDB_LOOP (OPAQUE_LINK_LSDB (area), rn, lsa)
|
||||
ospf_lsa_flush_schedule (ospf, lsa);
|
||||
LSDB_LOOP (OPAQUE_AREA_LSDB (area), rn, lsa)
|
||||
ospf_lsa_flush_schedule (ospf, lsa);
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
}
|
||||
|
||||
if (need_to_flush_ase)
|
||||
{
|
||||
LSDB_LOOP (EXTERNAL_LSDB (ospf), rn, lsa)
|
||||
ospf_lsa_flush_schedule (ospf, lsa);
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
LSDB_LOOP (OPAQUE_AS_LSDB (ospf), rn, lsa)
|
||||
ospf_lsa_flush_schedule (ospf, lsa);
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -3698,13 +3670,11 @@ ospf_lsa_refresh (struct ospf *ospf, struct ospf_lsa *lsa)
|
|||
else
|
||||
ospf_lsa_flush_as (ospf, lsa);
|
||||
break;
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
case OSPF_OPAQUE_LINK_LSA:
|
||||
case OSPF_OPAQUE_AREA_LSA:
|
||||
case OSPF_OPAQUE_AS_LSA:
|
||||
new = ospf_opaque_lsa_refresh (lsa);
|
||||
break;
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -27,11 +27,7 @@
|
|||
|
||||
/* OSPF LSA Range definition. */
|
||||
#define OSPF_MIN_LSA 1 /* begin range here */
|
||||
#if defined (HAVE_OPAQUE_LSA)
|
||||
#define OSPF_MAX_LSA 12
|
||||
#else
|
||||
#define OSPF_MAX_LSA 8
|
||||
#endif
|
||||
|
||||
/* OSPF LSA Type definition. */
|
||||
#define OSPF_UNKNOWN_LSA 0
|
||||
|
@ -211,9 +207,7 @@ struct as_external_lsa
|
|||
} e[1];
|
||||
};
|
||||
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
#include "ospfd/ospf_opaque.h"
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
/* Macros. */
|
||||
#define GET_METRIC(x) get_metric(x)
|
||||
|
|
|
@ -323,9 +323,7 @@ main (int argc, char **argv)
|
|||
#ifdef HAVE_SNMP
|
||||
ospf_snmp_init ();
|
||||
#endif /* HAVE_SNMP */
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
ospf_opaque_init ();
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
/* Need to initialize the default ospf structure, so the interface mode
|
||||
commands can be duly processed if they are received before 'router ospf',
|
||||
|
|
|
@ -310,7 +310,6 @@ ospf_nbr_count (struct ospf_interface *oi, int state)
|
|||
return count;
|
||||
}
|
||||
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
int
|
||||
ospf_nbr_count_opaque_capable (struct ospf_interface *oi)
|
||||
{
|
||||
|
@ -327,7 +326,6 @@ ospf_nbr_count_opaque_capable (struct ospf_interface *oi)
|
|||
|
||||
return count;
|
||||
}
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
/* lookup nbr by address - use this only if you know you must
|
||||
* otherwise use the ospf_nbr_lookup() wrapper, which deals
|
||||
|
|
|
@ -105,9 +105,7 @@ extern int ospf_nbr_bidirectional (struct in_addr *, struct in_addr *, int);
|
|||
extern void ospf_nbr_self_reset (struct ospf_interface *, struct in_addr);
|
||||
extern void ospf_nbr_add_self (struct ospf_interface *, struct in_addr);
|
||||
extern int ospf_nbr_count (struct ospf_interface *, int);
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
extern int ospf_nbr_count_opaque_capable (struct ospf_interface *);
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
extern struct ospf_neighbor *ospf_nbr_get (struct ospf_interface *,
|
||||
struct ospf_header *,
|
||||
struct ip *, struct prefix *);
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#define MTYPE_OPAQUE_INFO_PER_ID MTYPE_TMP
|
||||
|
||||
#include <zebra.h>
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
|
||||
#include "linklist.h"
|
||||
#include "prefix.h"
|
||||
|
@ -2185,4 +2184,3 @@ oi_to_top (struct ospf_interface *oi)
|
|||
return top;
|
||||
}
|
||||
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
|
|
@ -925,7 +925,6 @@ ospf_hello (struct ip *iph, struct ospf_header *ospfh,
|
|||
}
|
||||
#endif /* REJECT_IF_TBIT_ON */
|
||||
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
if (CHECK_FLAG (oi->ospf->config, OSPF_OPAQUE_CAPABLE)
|
||||
&& CHECK_FLAG (hello->options, OSPF_OPTION_O))
|
||||
{
|
||||
|
@ -941,7 +940,6 @@ ospf_hello (struct ip *iph, struct ospf_header *ospfh,
|
|||
UNSET_FLAG (hello->options, OSPF_OPTION_O); /* Ignore O-bit. */
|
||||
#endif /* STRICT_OBIT_USAGE_CHECK */
|
||||
}
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
/* new for NSSA is to ensure that NP is on and E is off */
|
||||
|
||||
|
@ -1093,7 +1091,6 @@ ospf_db_desc_proc (struct stream *s, struct ospf_interface *oi,
|
|||
return;
|
||||
}
|
||||
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
if (IS_OPAQUE_LSA (lsah->type)
|
||||
&& ! CHECK_FLAG (nbr->options, OSPF_OPTION_O))
|
||||
{
|
||||
|
@ -1101,14 +1098,11 @@ ospf_db_desc_proc (struct stream *s, struct ospf_interface *oi,
|
|||
OSPF_NSM_EVENT_SCHEDULE (nbr, NSM_SeqNumberMismatch);
|
||||
return;
|
||||
}
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
switch (lsah->type)
|
||||
{
|
||||
case OSPF_AS_EXTERNAL_LSA:
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
case OSPF_OPAQUE_AS_LSA:
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
/* Check for stub area. Reject if AS-External from stub but
|
||||
allow if from NSSA. */
|
||||
if (oi->area->external_routing == OSPF_AREA_STUB)
|
||||
|
@ -1282,7 +1276,6 @@ ospf_db_desc (struct ip *iph, struct ospf_header *ospfh,
|
|||
}
|
||||
#endif /* REJECT_IF_TBIT_ON */
|
||||
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
if (CHECK_FLAG (dd->options, OSPF_OPTION_O)
|
||||
&& !CHECK_FLAG (oi->ospf->config, OSPF_OPAQUE_CAPABLE))
|
||||
{
|
||||
|
@ -1292,7 +1285,6 @@ ospf_db_desc (struct ip *iph, struct ospf_header *ospfh,
|
|||
*/
|
||||
UNSET_FLAG (dd->options, OSPF_OPTION_O);
|
||||
}
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
/* Add event to thread. */
|
||||
OSPF_NSM_EVENT_SCHEDULE (nbr, NSM_PacketReceived);
|
||||
|
@ -1357,7 +1349,6 @@ ospf_db_desc (struct ip *iph, struct ospf_header *ospfh,
|
|||
/* This is where the real Options are saved */
|
||||
nbr->options = dd->options;
|
||||
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
if (CHECK_FLAG (oi->ospf->config, OSPF_OPAQUE_CAPABLE))
|
||||
{
|
||||
if (IS_DEBUG_OSPF_EVENT)
|
||||
|
@ -1375,7 +1366,6 @@ ospf_db_desc (struct ip *iph, struct ospf_header *ospfh,
|
|||
/* This situation is undesirable, but not a real error. */
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
OSPF_NSM_EVENT_EXECUTE (nbr, NSM_NegotiationDone);
|
||||
|
||||
|
@ -1653,7 +1643,6 @@ ospf_ls_upd_list_lsa (struct ospf_neighbor *nbr, struct stream *s,
|
|||
if (ntohs (lsah->ls_age) > OSPF_LSA_MAXAGE)
|
||||
lsah->ls_age = htons (OSPF_LSA_MAXAGE);
|
||||
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
if (CHECK_FLAG (nbr->options, OSPF_OPTION_O))
|
||||
{
|
||||
#ifdef STRICT_OBIT_USAGE_CHECK
|
||||
|
@ -1685,7 +1674,6 @@ ospf_ls_upd_list_lsa (struct ospf_neighbor *nbr, struct stream *s,
|
|||
zlog_warn ("LSA[Type%d:%s]: Opaque capability mismatch?", lsah->type, inet_ntoa (lsah->id));
|
||||
continue;
|
||||
}
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
/* Create OSPF LSA instance. */
|
||||
lsa = ospf_lsa_new ();
|
||||
|
@ -1695,16 +1683,12 @@ ospf_ls_upd_list_lsa (struct ospf_neighbor *nbr, struct stream *s,
|
|||
switch (lsah->type)
|
||||
{
|
||||
case OSPF_AS_EXTERNAL_LSA:
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
case OSPF_OPAQUE_AS_LSA:
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
lsa->area = NULL;
|
||||
break;
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
case OSPF_OPAQUE_LINK_LSA:
|
||||
lsa->oi = oi; /* Remember incoming interface for flooding control. */
|
||||
/* Fallthrough */
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
default:
|
||||
lsa->area = oi->area;
|
||||
break;
|
||||
|
@ -1892,7 +1876,6 @@ ospf_ls_upd (struct ospf *ospf, struct ip *iph, struct ospf_header *ospfh,
|
|||
DISCARD_LSA (lsa, 3);
|
||||
}
|
||||
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
if (IS_OPAQUE_LSA (lsa->data->type)
|
||||
&& IPV4_ADDR_SAME (&lsa->data->adv_router, &oi->ospf->router_id))
|
||||
{
|
||||
|
@ -1940,7 +1923,6 @@ ospf_ls_upd (struct ospf *ospf, struct ip *iph, struct ospf_header *ospfh,
|
|||
continue;
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
/* It might be happen that received LSA is self-originated network LSA, but
|
||||
* router ID is changed. So, we should check if LSA is a network-LSA whose
|
||||
|
@ -2517,7 +2499,6 @@ ospf_lsa_examin (struct lsa_header * lsah, const u_int16_t lsalen, const u_char
|
|||
case OSPF_SUMMARY_LSA:
|
||||
case OSPF_ASBR_SUMMARY_LSA:
|
||||
/* RFC2328 A.4.4, LSA header + 4 bytes followed by N>=1 4-bytes TOS blocks */
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
case OSPF_OPAQUE_LINK_LSA:
|
||||
case OSPF_OPAQUE_AREA_LSA:
|
||||
case OSPF_OPAQUE_AS_LSA:
|
||||
|
@ -2525,7 +2506,6 @@ ospf_lsa_examin (struct lsa_header * lsah, const u_int16_t lsalen, const u_char
|
|||
* data) padded to 32-bit alignment." This is considered equivalent
|
||||
* to 4-byte alignment of all other LSA types, see OSPF-ALIGNMENT.txt
|
||||
* file for the detailed analysis of this passage. */
|
||||
#endif
|
||||
ret = lsalen % 4 ? MSG_NG : MSG_OK;
|
||||
break;
|
||||
default:
|
||||
|
@ -3157,10 +3137,8 @@ ospf_make_db_desc (struct ospf_interface *oi, struct ospf_neighbor *nbr,
|
|||
|
||||
/* Set Options. */
|
||||
options = OPTIONS (oi);
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
if (CHECK_FLAG (oi->ospf->config, OSPF_OPAQUE_CAPABLE))
|
||||
SET_FLAG (options, OSPF_OPTION_O);
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
stream_putc (s, options);
|
||||
|
||||
/* DD flags */
|
||||
|
@ -3185,7 +3163,6 @@ ospf_make_db_desc (struct ospf_interface *oi, struct ospf_neighbor *nbr,
|
|||
for (rn = route_top (table); rn; rn = route_next (rn))
|
||||
if ((lsa = rn->info) != NULL)
|
||||
{
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
if (IS_OPAQUE_LSA (lsa->data->type)
|
||||
&& (! CHECK_FLAG (options, OSPF_OPTION_O)))
|
||||
{
|
||||
|
@ -3194,7 +3171,6 @@ ospf_make_db_desc (struct ospf_interface *oi, struct ospf_neighbor *nbr,
|
|||
ospf_lsdb_delete (lsdb, lsa);
|
||||
continue;
|
||||
}
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
if (!CHECK_FLAG (lsa->flags, OSPF_LSA_DISCARD))
|
||||
{
|
||||
|
|
|
@ -27,9 +27,6 @@
|
|||
#include <zebra.h>
|
||||
|
||||
#ifdef HAVE_OSPF_TE
|
||||
#ifndef HAVE_OPAQUE_LSA
|
||||
#error "Wrong configure option"
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
#include "linklist.h"
|
||||
#include "prefix.h"
|
||||
|
|
|
@ -3265,7 +3265,6 @@ show_ip_ospf_area (struct vty *vty, struct ospf_area *area, json_object *json_ar
|
|||
ospf_lsdb_checksum (area->lsdb, OSPF_AS_NSSA_LSA), VTY_NEWLINE);
|
||||
}
|
||||
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
if (use_json)
|
||||
{
|
||||
json_object_int_add(json_area, "lsaOpaqueLinkNumber", ospf_lsdb_count (area->lsdb, OSPF_OPAQUE_LINK_LSA));
|
||||
|
@ -3282,7 +3281,6 @@ show_ip_ospf_area (struct vty *vty, struct ospf_area *area, json_object *json_ar
|
|||
ospf_lsdb_count (area->lsdb, OSPF_OPAQUE_AREA_LSA),
|
||||
ospf_lsdb_checksum (area->lsdb, OSPF_OPAQUE_AREA_LSA), VTY_NEWLINE);
|
||||
}
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
if (use_json)
|
||||
json_object_object_add(json_areas, inet_ntoa (area->area_id), json_area);
|
||||
|
@ -3366,7 +3364,6 @@ show_ip_ospf_common (struct vty *vty, struct ospf *ospf, u_char use_json)
|
|||
"enabled" : "disabled", VTY_NEWLINE);
|
||||
}
|
||||
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
if (use_json)
|
||||
{
|
||||
if (CHECK_FLAG (ospf->config, OSPF_OPAQUE_CAPABLE))
|
||||
|
@ -3380,7 +3377,6 @@ show_ip_ospf_common (struct vty *vty, struct ospf *ospf, u_char use_json)
|
|||
CHECK_FLAG (ospf->config, OSPF_OPAQUE_CAPABLE) ? "enabled" : "disabled",
|
||||
VTY_NEWLINE);
|
||||
}
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
/* Show stub-router configuration */
|
||||
if (ospf->stub_router_startup_time != OSPF_STUB_ROUTER_UNCONFIGURED
|
||||
|
@ -3534,7 +3530,6 @@ show_ip_ospf_common (struct vty *vty, struct ospf *ospf, u_char use_json)
|
|||
ospf_lsdb_checksum (ospf->lsdb, OSPF_AS_EXTERNAL_LSA), VTY_NEWLINE);
|
||||
}
|
||||
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
if (use_json)
|
||||
{
|
||||
json_object_int_add(json, "lsaAsopaqueCounter",
|
||||
|
@ -3548,7 +3543,6 @@ show_ip_ospf_common (struct vty *vty, struct ospf *ospf, u_char use_json)
|
|||
ospf_lsdb_count (ospf->lsdb, OSPF_OPAQUE_AS_LSA),
|
||||
ospf_lsdb_checksum (ospf->lsdb, OSPF_OPAQUE_AS_LSA), VTY_NEWLINE);
|
||||
}
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
/* Show number of areas attached. */
|
||||
if (use_json)
|
||||
|
@ -5095,11 +5089,9 @@ show_lsa_summary (struct vty *vty, struct ospf_lsa *lsa, int self)
|
|||
break;
|
||||
case OSPF_NETWORK_LSA:
|
||||
case OSPF_ASBR_SUMMARY_LSA:
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
case OSPF_OPAQUE_LINK_LSA:
|
||||
case OSPF_OPAQUE_AREA_LSA:
|
||||
case OSPF_OPAQUE_AS_LSA:
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -5119,12 +5111,10 @@ static const char *show_database_desc[] =
|
|||
"AS External Link States",
|
||||
"Group Membership LSA",
|
||||
"NSSA-external Link States",
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
"Type-8 LSA",
|
||||
"Link-Local Opaque-LSA",
|
||||
"Area-Local Opaque-LSA",
|
||||
"AS-external Opaque-LSA",
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
};
|
||||
|
||||
static const char *show_database_header[] =
|
||||
|
@ -5137,12 +5127,10 @@ static const char *show_database_header[] =
|
|||
"Link ID ADV Router Age Seq# CkSum Route",
|
||||
" --- header for Group Member ----",
|
||||
"Link ID ADV Router Age Seq# CkSum Route",
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
" --- type-8 ---",
|
||||
"Opaque-Type/Id ADV Router Age Seq# CkSum",
|
||||
"Opaque-Type/Id ADV Router Age Seq# CkSum",
|
||||
"Opaque-Type/Id ADV Router Age Seq# CkSum",
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
};
|
||||
|
||||
static void
|
||||
|
@ -5414,7 +5402,6 @@ show_func_dummy (struct vty *vty, struct ospf_lsa *lsa)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
static int
|
||||
show_opaque_lsa_detail (struct vty *vty, struct ospf_lsa *lsa)
|
||||
{
|
||||
|
@ -5427,7 +5414,6 @@ show_opaque_lsa_detail (struct vty *vty, struct ospf_lsa *lsa)
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
int (*show_function[])(struct vty *, struct ospf_lsa *) =
|
||||
{
|
||||
|
@ -5439,12 +5425,10 @@ int (*show_function[])(struct vty *, struct ospf_lsa *) =
|
|||
show_as_external_lsa_detail,
|
||||
show_func_dummy,
|
||||
show_as_nssa_lsa_detail, /* almost same as external */
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
NULL, /* type-8 */
|
||||
show_opaque_lsa_detail,
|
||||
show_opaque_lsa_detail,
|
||||
show_opaque_lsa_detail,
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
};
|
||||
|
||||
static void
|
||||
|
@ -5503,9 +5487,7 @@ show_lsa_detail (struct vty *vty, struct ospf *ospf, int type,
|
|||
switch (type)
|
||||
{
|
||||
case OSPF_AS_EXTERNAL_LSA:
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
case OSPF_OPAQUE_AS_LSA:
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
vty_out (vty, " %s %s%s",
|
||||
show_database_desc[type],
|
||||
VTY_NEWLINE, VTY_NEWLINE);
|
||||
|
@ -5552,9 +5534,7 @@ show_lsa_detail_adv_router (struct vty *vty, struct ospf *ospf, int type,
|
|||
switch (type)
|
||||
{
|
||||
case OSPF_AS_EXTERNAL_LSA:
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
case OSPF_OPAQUE_AS_LSA:
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
vty_out (vty, " %s %s%s",
|
||||
show_database_desc[type],
|
||||
VTY_NEWLINE, VTY_NEWLINE);
|
||||
|
@ -5590,9 +5570,7 @@ show_ip_ospf_database_summary (struct vty *vty, struct ospf *ospf, int self)
|
|||
switch (type)
|
||||
{
|
||||
case OSPF_AS_EXTERNAL_LSA:
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
case OSPF_OPAQUE_AS_LSA:
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
continue;
|
||||
default:
|
||||
break;
|
||||
|
@ -5619,9 +5597,7 @@ show_ip_ospf_database_summary (struct vty *vty, struct ospf *ospf, int self)
|
|||
switch (type)
|
||||
{
|
||||
case OSPF_AS_EXTERNAL_LSA:
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
case OSPF_OPAQUE_AS_LSA:
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
|
@ -5673,17 +5649,10 @@ show_ip_ospf_database_maxage (struct vty *vty, struct ospf *ospf)
|
|||
#define OSPF_LSA_TYPE_NSSA_DESC "NSSA external link state\n"
|
||||
#define OSPF_LSA_TYPE_NSSA_CMD_STR "|nssa-external"
|
||||
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
#define OSPF_LSA_TYPE_OPAQUE_LINK_DESC "Link local Opaque-LSA\n"
|
||||
#define OSPF_LSA_TYPE_OPAQUE_AREA_DESC "Link area Opaque-LSA\n"
|
||||
#define OSPF_LSA_TYPE_OPAQUE_AS_DESC "Link AS Opaque-LSA\n"
|
||||
#define OSPF_LSA_TYPE_OPAQUE_CMD_STR "|opaque-link|opaque-area|opaque-as"
|
||||
#else /* HAVE_OPAQUE_LSA */
|
||||
#define OSPF_LSA_TYPE_OPAQUE_LINK_DESC ""
|
||||
#define OSPF_LSA_TYPE_OPAQUE_AREA_DESC ""
|
||||
#define OSPF_LSA_TYPE_OPAQUE_AS_DESC ""
|
||||
#define OSPF_LSA_TYPE_OPAQUE_CMD_STR ""
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
#define OSPF_LSA_TYPES_CMD_STR \
|
||||
"asbr-summary|external|network|router|summary" \
|
||||
|
@ -5745,14 +5714,12 @@ show_ip_ospf_database_common (struct vty *vty, struct ospf *ospf,
|
|||
show_ip_ospf_database_maxage (vty, ospf);
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
else if (strncmp (argv[arg_base + 0], "opaque-l", 8) == 0)
|
||||
type = OSPF_OPAQUE_LINK_LSA;
|
||||
else if (strncmp (argv[arg_base + 0], "opaque-ar", 9) == 0)
|
||||
type = OSPF_OPAQUE_AREA_LSA;
|
||||
else if (strncmp (argv[arg_base + 0], "opaque-as", 9) == 0)
|
||||
type = OSPF_OPAQUE_AS_LSA;
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
else
|
||||
return CMD_WARNING;
|
||||
|
||||
|
@ -5947,14 +5914,12 @@ show_ip_ospf_database_type_adv_router_common (struct vty *vty, struct ospf *ospf
|
|||
type = OSPF_ASBR_SUMMARY_LSA;
|
||||
else if (strncmp (argv[arg_base + 0], "e", 1) == 0)
|
||||
type = OSPF_AS_EXTERNAL_LSA;
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
else if (strncmp (argv[arg_base + 0], "opaque-l", 8) == 0)
|
||||
type = OSPF_OPAQUE_LINK_LSA;
|
||||
else if (strncmp (argv[arg_base + 0], "opaque-ar", 9) == 0)
|
||||
type = OSPF_OPAQUE_AREA_LSA;
|
||||
else if (strncmp (argv[arg_base + 0], "opaque-as", 9) == 0)
|
||||
type = OSPF_OPAQUE_AS_LSA;
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
else
|
||||
return CMD_WARNING;
|
||||
|
||||
|
@ -9489,9 +9454,7 @@ config_write_interface (struct vty *vty)
|
|||
}
|
||||
} while (rn);
|
||||
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
ospf_opaque_config_write_if (vty, ifp);
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
}
|
||||
|
||||
return write;
|
||||
|
@ -9987,9 +9950,7 @@ ospf_config_write (struct vty *vty)
|
|||
/* Distance configuration. */
|
||||
config_write_ospf_distance (vty, ospf);
|
||||
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
ospf_opaque_config_write_router (vty, ospf);
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
}
|
||||
|
||||
return write;
|
||||
|
|
|
@ -351,9 +351,7 @@ ospf_get ()
|
|||
if (ospf->router_id_static.s_addr == 0)
|
||||
ospf_router_id_update (ospf);
|
||||
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
ospf_opaque_type11_lsa_init (ospf);
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
}
|
||||
|
||||
return ospf;
|
||||
|
@ -373,9 +371,7 @@ ospf_get_instance (u_short instance)
|
|||
if (ospf->router_id_static.s_addr == 0)
|
||||
ospf_router_id_update (ospf);
|
||||
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
ospf_opaque_type11_lsa_init (ospf);
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
}
|
||||
|
||||
return ospf;
|
||||
|
@ -513,9 +509,7 @@ ospf_finish_final (struct ospf *ospf)
|
|||
int i;
|
||||
u_short instance = 0;
|
||||
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
ospf_opaque_type11_lsa_term (ospf);
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
/* be nice if this worked, but it doesn't */
|
||||
/*ospf_flush_self_originated_lsas_now (ospf);*/
|
||||
|
@ -611,17 +605,13 @@ ospf_finish_final (struct ospf *ospf)
|
|||
OSPF_TIMER_OFF (ospf->t_lsa_refresher);
|
||||
OSPF_TIMER_OFF (ospf->t_read);
|
||||
OSPF_TIMER_OFF (ospf->t_write);
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
OSPF_TIMER_OFF (ospf->t_opaque_lsa_self);
|
||||
#endif
|
||||
|
||||
close (ospf->fd);
|
||||
stream_free(ospf->ibuf);
|
||||
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
LSDB_LOOP (OPAQUE_AS_LSDB (ospf), rn, lsa)
|
||||
ospf_discard_from_db (ospf, ospf->lsdb, lsa);
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
LSDB_LOOP (EXTERNAL_LSDB (ospf), rn, lsa)
|
||||
ospf_discard_from_db (ospf, ospf->lsdb, lsa);
|
||||
|
||||
|
@ -733,9 +723,7 @@ ospf_area_new (struct ospf *ospf, struct in_addr area_id)
|
|||
/* Self-originated LSAs initialize. */
|
||||
new->router_lsa_self = NULL;
|
||||
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
ospf_opaque_type10_lsa_init (new);
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
new->oiflist = list_new ();
|
||||
new->ranges = route_table_init ();
|
||||
|
@ -764,12 +752,10 @@ ospf_area_free (struct ospf_area *area)
|
|||
|
||||
LSDB_LOOP (NSSA_LSDB (area), rn, lsa)
|
||||
ospf_discard_from_db (area->ospf, area->lsdb, lsa);
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
LSDB_LOOP (OPAQUE_AREA_LSDB (area), rn, lsa)
|
||||
ospf_discard_from_db (area->ospf, area->lsdb, lsa);
|
||||
LSDB_LOOP (OPAQUE_LINK_LSDB (area), rn, lsa)
|
||||
ospf_discard_from_db (area->ospf, area->lsdb, lsa);
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
ospf_lsdb_delete_all (area->lsdb);
|
||||
ospf_lsdb_free (area->lsdb);
|
||||
|
@ -787,9 +773,7 @@ ospf_area_free (struct ospf_area *area)
|
|||
|
||||
/* Cancel timer. */
|
||||
OSPF_TIMER_OFF (area->t_stub_router);
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
OSPF_TIMER_OFF (area->t_opaque_lsa_self);
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
if (OSPF_IS_AREA_BACKBONE (area))
|
||||
area->ospf->backbone = NULL;
|
||||
|
|
|
@ -162,11 +162,9 @@ struct ospf
|
|||
#define OSPF_LOG_ADJACENCY_CHANGES (1 << 3)
|
||||
#define OSPF_LOG_ADJACENCY_DETAIL (1 << 4)
|
||||
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
/* Opaque-LSA administrative flags. */
|
||||
u_char opaque;
|
||||
#define OPAQUE_OPERATION_READY_BIT (1 << 0)
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
/* RFC3137 stub router. Configured time to stay stub / max-metric */
|
||||
unsigned int stub_router_startup_time; /* seconds */
|
||||
|
@ -209,9 +207,7 @@ struct ospf
|
|||
int external_origin; /* AS-external-LSA origin flag. */
|
||||
int ase_calc; /* ASE calculation flag. */
|
||||
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
struct list *opaque_lsa_self; /* Type-11 Opaque-LSAs */
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
/* Routing tables. */
|
||||
struct route_table *old_table; /* Old routing table. */
|
||||
|
@ -240,9 +236,7 @@ struct ospf
|
|||
struct thread *t_spf_calc; /* SPF calculation timer. */
|
||||
struct thread *t_ase_calc; /* ASE calculation timer. */
|
||||
struct thread *t_external_lsa; /* AS-external-LSA origin timer. */
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
struct thread *t_opaque_lsa_self; /* Type-11 Opaque-LSAs origin event. */
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
unsigned int maxage_delay; /* Delay on Maxage remover timer, sec */
|
||||
struct thread *t_maxage; /* MaxAge LSA remover timer. */
|
||||
|
@ -365,9 +359,7 @@ struct ospf_area
|
|||
|
||||
/* Self-originated LSAs. */
|
||||
struct ospf_lsa *router_lsa_self;
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
struct list *opaque_lsa_self; /* Type-10 Opaque-LSAs */
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
/* Area announce list. */
|
||||
struct
|
||||
|
@ -409,9 +401,7 @@ struct ospf_area
|
|||
|
||||
/* Threads. */
|
||||
struct thread *t_stub_router; /* Stub-router timer */
|
||||
#ifdef HAVE_OPAQUE_LSA
|
||||
struct thread *t_opaque_lsa_self; /* Type-10 Opaque-LSAs origin. */
|
||||
#endif /* HAVE_OPAQUE_LSA */
|
||||
|
||||
/* Statistics field. */
|
||||
u_int32_t spf_calculation; /* SPF Calculation Count. */
|
||||
|
|
Loading…
Reference in a new issue