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:
Donald Sharp 2015-12-16 14:22:10 -05:00 committed by Donald Sharp
parent 039f3a3495
commit cd66cd4ce1
20 changed files with 3 additions and 208 deletions

View file

@ -265,8 +265,6 @@ AC_ARG_WITH(libpam,
AS_HELP_STRING([--with-libpam], [use libpam for PAM support in vtysh])) AS_HELP_STRING([--with-libpam], [use libpam for PAM support in vtysh]))
AC_ARG_ENABLE(tcp-zebra, AC_ARG_ENABLE(tcp-zebra,
AS_HELP_STRING([--enable-tcp-zebra], [enable TCP/IP socket connection between zebra and protocol daemon])) 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, AC_ARG_ENABLE(ospfapi,
AS_HELP_STRING([--disable-ospfapi], [do not build OSPFAPI to access the OSPF LSA Database])) AS_HELP_STRING([--disable-ospfapi], [do not build OSPFAPI to access the OSPF LSA Database]))
AC_ARG_ENABLE(ospfclient, 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) AC_DEFINE(HAVE_TCP_ZEBRA,,Use TCP for zebra communication)
fi fi
if test "${enable_opaque_lsa}" != "no"; then
AC_DEFINE(HAVE_OPAQUE_LSA,,OSPF Opaque LSA)
fi
if test "${enable_ospf_te}" != "no"; then if test "${enable_ospf_te}" != "no"; then
AC_DEFINE(HAVE_OPAQUE_LSA,,OSPF Opaque LSA)
AC_DEFINE(HAVE_OSPF_TE,,OSPF TE) AC_DEFINE(HAVE_OSPF_TE,,OSPF TE)
fi fi
@ -1245,16 +1238,14 @@ fi
AM_CONDITIONAL(WATCHQUAGGA, test "x$WATCHQUAGGA" = "xwatchquagga") AM_CONDITIONAL(WATCHQUAGGA, test "x$WATCHQUAGGA" = "xwatchquagga")
OSPFCLIENT="" 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) AC_DEFINE(SUPPORT_OSPF_API,,OSPFAPI)
if test "${enable_ospfclient}" != "no";then if test "${enable_ospfclient}" != "no";then
OSPFCLIENT="ospfclient" OSPFCLIENT="ospfclient"
fi fi
fi
fi fi
AM_CONDITIONAL(OSPFCLIENT, test "x$OSPFCLIENT" = "xospfclient") AM_CONDITIONAL(OSPFCLIENT, test "x$OSPFCLIENT" = "xospfclient")
case "${enable_ripngd}" in case "${enable_ripngd}" in

View file

@ -23,9 +23,6 @@
#include <zebra.h> #include <zebra.h>
#ifdef SUPPORT_OSPF_API #ifdef SUPPORT_OSPF_API
#ifndef HAVE_OPAQUE_LSA
#error "Core Opaque-LSA module must be configured."
#endif /* HAVE_OPAQUE_LSA */
#include "linklist.h" #include "linklist.h"
#include "prefix.h" #include "prefix.h"

View file

@ -23,9 +23,6 @@
#include <zebra.h> #include <zebra.h>
#ifdef SUPPORT_OSPF_API #ifdef SUPPORT_OSPF_API
#ifndef HAVE_OPAQUE_LSA
#error "Core Opaque-LSA module must be configured."
#endif /* HAVE_OPAQUE_LSA */
#include "linklist.h" #include "linklist.h"
#include "prefix.h" #include "prefix.h"

View file

@ -619,13 +619,11 @@ ospf_packet_ls_upd_dump (struct stream *s, u_int16_t length)
case OSPF_AS_NSSA_LSA: case OSPF_AS_NSSA_LSA:
ospf_as_external_lsa_dump (s, length); ospf_as_external_lsa_dump (s, length);
break; break;
#ifdef HAVE_OPAQUE_LSA
case OSPF_OPAQUE_LINK_LSA: case OSPF_OPAQUE_LINK_LSA:
case OSPF_OPAQUE_AREA_LSA: case OSPF_OPAQUE_AREA_LSA:
case OSPF_OPAQUE_AS_LSA: case OSPF_OPAQUE_AS_LSA:
ospf_opaque_lsa_dump (s, length); ospf_opaque_lsa_dump (s, length);
break; break;
#endif /* HAVE_OPAQUE_LSA */
default: default:
break; break;
} }

View file

@ -156,9 +156,7 @@ ospf_process_self_originated_lsa (struct ospf *ospf,
ospf_router_lsa_update_area (area); ospf_router_lsa_update_area (area);
return; return;
case OSPF_NETWORK_LSA: case OSPF_NETWORK_LSA:
#ifdef HAVE_OPAQUE_LSA
case OSPF_OPAQUE_LINK_LSA: case OSPF_OPAQUE_LINK_LSA:
#endif /* HAVE_OPAQUE_LSA */
/* We must find the interface the LSA could belong to. /* We must find the interface the LSA could belong to.
If the interface is no more a broadcast type or we are no more 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 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; return;
} }
#ifdef HAVE_OPAQUE_LSA
if (new->data->type == OSPF_OPAQUE_LINK_LSA) if (new->data->type == OSPF_OPAQUE_LINK_LSA)
{ {
ospf_opaque_lsa_refresh (new); ospf_opaque_lsa_refresh (new);
return; return;
} }
#endif /* HAVE_OPAQUE_LSA */
if (oi->network_lsa_self) if (oi->network_lsa_self)
oi->network_lsa_self->data->ls_seqnum = new->data->ls_seqnum; oi->network_lsa_self->data->ls_seqnum = new->data->ls_seqnum;
@ -211,14 +207,12 @@ ospf_process_self_originated_lsa (struct ospf *ospf,
else else
ospf_lsa_flush_as (ospf, new); ospf_lsa_flush_as (ospf, new);
break; break;
#ifdef HAVE_OPAQUE_LSA
case OSPF_OPAQUE_AREA_LSA: case OSPF_OPAQUE_AREA_LSA:
ospf_opaque_lsa_refresh (new); ospf_opaque_lsa_refresh (new);
break; break;
case OSPF_OPAQUE_AS_LSA: case OSPF_OPAQUE_AS_LSA:
ospf_opaque_lsa_refresh (new); /* Reconsideration may needed. *//* XXX */ ospf_opaque_lsa_refresh (new); /* Reconsideration may needed. *//* XXX */
break; break;
#endif /* HAVE_OPAQUE_LSA */
default: default:
break; break;
} }
@ -299,25 +293,17 @@ ospf_flood (struct ospf *ospf, struct ospf_neighbor *nbr,
interface. */ interface. */
lsa_ack_flag = ospf_flood_through (ospf, nbr, new); lsa_ack_flag = ospf_flood_through (ospf, nbr, new);
#ifdef HAVE_OPAQUE_LSA
/* Remove the current database copy from all neighbors' Link state /* Remove the current database copy from all neighbors' Link state
retransmission lists. AS_EXTERNAL and AS_EXTERNAL_OPAQUE does retransmission lists. AS_EXTERNAL and AS_EXTERNAL_OPAQUE does
^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^
not have area ID. not have area ID.
All other (even NSSA's) do 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) if (current)
{ {
switch (current->data->type) switch (current->data->type)
{ {
case OSPF_AS_EXTERNAL_LSA: case OSPF_AS_EXTERNAL_LSA:
#ifdef HAVE_OPAQUE_LSA
case OSPF_OPAQUE_AS_LSA: case OSPF_OPAQUE_AS_LSA:
#endif /* HAVE_OPAQUE_LSA */
ospf_ls_retransmit_delete_nbr_as (ospf, current); ospf_ls_retransmit_delete_nbr_as (ospf, current);
break; break;
default: 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 (IS_OPAQUE_LSA (lsa->data->type))
{ {
if (! CHECK_FLAG (onbr->options, OSPF_OPTION_O)) if (! CHECK_FLAG (onbr->options, OSPF_OPTION_O))
@ -449,7 +434,6 @@ ospf_flood_through_interface (struct ospf_interface *oi,
continue; continue;
} }
} }
#endif /* HAVE_OPAQUE_LSA */
/* If the new LSA was received from this neighbor, /* If the new LSA was received from this neighbor,
examine the next neighbor. */ examine the next neighbor. */
@ -584,7 +568,6 @@ ospf_flood_through_area (struct ospf_area *area,
oi->type == OSPF_IFTYPE_VIRTUALLINK) oi->type == OSPF_IFTYPE_VIRTUALLINK)
continue; continue;
#ifdef HAVE_OPAQUE_LSA
if ((lsa->data->type == OSPF_OPAQUE_LINK_LSA) && (lsa->oi != oi)) 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); (void *)lsa->oi, (void *)oi);
continue; continue;
} }
#endif /* HAVE_OPAQUE_LSA */
if (ospf_flood_through_interface (oi, inbr, lsa)) if (ospf_flood_through_interface (oi, inbr, lsa))
lsa_ack_flag = 1; lsa_ack_flag = 1;
@ -706,16 +688,12 @@ ospf_flood_through (struct ospf *ospf,
case OSPF_NETWORK_LSA: case OSPF_NETWORK_LSA:
case OSPF_SUMMARY_LSA: case OSPF_SUMMARY_LSA:
case OSPF_ASBR_SUMMARY_LSA: case OSPF_ASBR_SUMMARY_LSA:
#ifdef HAVE_OPAQUE_LSA
case OSPF_OPAQUE_LINK_LSA: /* ospf_flood_through_interface ? */ case OSPF_OPAQUE_LINK_LSA: /* ospf_flood_through_interface ? */
case OSPF_OPAQUE_AREA_LSA: case OSPF_OPAQUE_AREA_LSA:
#endif /* HAVE_OPAQUE_LSA */
lsa_ack_flag = ospf_flood_through_area (inbr->oi->area, inbr, lsa); lsa_ack_flag = ospf_flood_through_area (inbr->oi->area, inbr, lsa);
break; break;
case OSPF_AS_EXTERNAL_LSA: /* Type-5 */ case OSPF_AS_EXTERNAL_LSA: /* Type-5 */
#ifdef HAVE_OPAQUE_LSA
case OSPF_OPAQUE_AS_LSA: case OSPF_OPAQUE_AS_LSA:
#endif /* HAVE_OPAQUE_LSA */
lsa_ack_flag = ospf_flood_through_as (ospf, inbr, lsa); lsa_ack_flag = ospf_flood_through_as (ospf, inbr, lsa);
break; break;
/* Type-7 Only received within NSSA, then flooded */ /* Type-7 Only received within NSSA, then flooded */
@ -745,9 +723,7 @@ ospf_flood_through (struct ospf *ospf,
switch (lsa->data->type) switch (lsa->data->type)
{ {
case OSPF_AS_EXTERNAL_LSA: /* Type-5 */ case OSPF_AS_EXTERNAL_LSA: /* Type-5 */
#ifdef HAVE_OPAQUE_LSA
case OSPF_OPAQUE_AS_LSA: case OSPF_OPAQUE_AS_LSA:
#endif /* HAVE_OPAQUE_LSA */
lsa_ack_flag = ospf_flood_through_as (ospf, inbr, lsa); lsa_ack_flag = ospf_flood_through_as (ospf, inbr, lsa);
break; break;
/* Type-7 Only received within NSSA, then flooded */ /* 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_SUMMARY_LSA:
case OSPF_ASBR_SUMMARY_LSA: case OSPF_ASBR_SUMMARY_LSA:
case OSPF_AS_NSSA_LSA: case OSPF_AS_NSSA_LSA:
#ifdef HAVE_OPAQUE_LSA
case OSPF_OPAQUE_LINK_LSA: case OSPF_OPAQUE_LINK_LSA:
case OSPF_OPAQUE_AREA_LSA: case OSPF_OPAQUE_AREA_LSA:
#endif /* HAVE_OPAQUE_LSA */
ospf_lsa_flush_area (lsa, lsa->area); ospf_lsa_flush_area (lsa, lsa->area);
break; break;
case OSPF_AS_EXTERNAL_LSA: case OSPF_AS_EXTERNAL_LSA:
#ifdef HAVE_OPAQUE_LSA
case OSPF_OPAQUE_AS_LSA: case OSPF_OPAQUE_AS_LSA:
#endif /* HAVE_OPAQUE_LSA */
ospf_lsa_flush_as (ospf, lsa); ospf_lsa_flush_as (ospf, lsa);
break; break;
default: default:

View file

@ -243,9 +243,7 @@ ospf_if_new (struct ospf *ospf, struct interface *ifp, struct prefix *p)
oi->crypt_seqnum = time (NULL); oi->crypt_seqnum = time (NULL);
#ifdef HAVE_OPAQUE_LSA
ospf_opaque_type9_lsa_init (oi); ospf_opaque_type9_lsa_init (oi);
#endif /* HAVE_OPAQUE_LSA */
oi->ospf = ospf; oi->ospf = ospf;
@ -307,9 +305,7 @@ ospf_if_free (struct ospf_interface *oi)
assert (oi->state == ISM_Down); assert (oi->state == ISM_Down);
#ifdef HAVE_OPAQUE_LSA
ospf_opaque_type9_lsa_term (oi); ospf_opaque_type9_lsa_term (oi);
#endif /* HAVE_OPAQUE_LSA */
/* Free Pseudo Neighbour */ /* Free Pseudo Neighbour */
ospf_nbr_delete (oi->nbr_self); 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); SET_IF_PARAM (IF_DEF_PARAMS (ifp), auth_type);
IF_DEF_PARAMS (ifp)->auth_type = OSPF_AUTH_NOTSET; IF_DEF_PARAMS (ifp)->auth_type = OSPF_AUTH_NOTSET;
#ifdef HAVE_OPAQUE_LSA
rc = ospf_opaque_new_if (ifp); rc = ospf_opaque_new_if (ifp);
#endif /* HAVE_OPAQUE_LSA */
return rc; return rc;
} }
@ -707,9 +701,7 @@ ospf_if_delete_hook (struct interface *ifp)
{ {
int rc = 0; int rc = 0;
struct route_node *rn; struct route_node *rn;
#ifdef HAVE_OPAQUE_LSA
rc = ospf_opaque_del_if (ifp); rc = ospf_opaque_del_if (ifp);
#endif /* HAVE_OPAQUE_LSA */
route_table_finish (IF_OIFS (ifp)); route_table_finish (IF_OIFS (ifp));

View file

@ -188,9 +188,7 @@ struct ospf_interface
/* self-originated LSAs. */ /* self-originated LSAs. */
struct ospf_lsa *network_lsa_self; /* network-LSA. */ struct ospf_lsa *network_lsa_self; /* network-LSA. */
#ifdef HAVE_OPAQUE_LSA
struct list *opaque_lsa_self; /* Type-9 Opaque-LSAs */ struct list *opaque_lsa_self; /* Type-9 Opaque-LSAs */
#endif /* HAVE_OPAQUE_LSA */
struct route_table *ls_upd_queue; struct route_table *ls_upd_queue;
@ -211,9 +209,7 @@ struct ospf_interface
struct thread *t_ls_ack; /* timer */ struct thread *t_ls_ack; /* timer */
struct thread *t_ls_ack_direct; /* event */ struct thread *t_ls_ack_direct; /* event */
struct thread *t_ls_upd_event; /* event */ struct thread *t_ls_upd_event; /* event */
#ifdef HAVE_OPAQUE_LSA
struct thread *t_opaque_lsa_self; /* Type-9 Opaque-LSAs */ struct thread *t_opaque_lsa_self; /* Type-9 Opaque-LSAs */
#endif /* HAVE_OPAQUE_LSA */
int on_write_q; int on_write_q;

View file

@ -593,9 +593,7 @@ ism_change_state (struct ospf_interface *oi, int state)
oi->network_lsa_self = NULL; oi->network_lsa_self = NULL;
} }
#ifdef HAVE_OPAQUE_LSA
ospf_opaque_ism_change (oi, old_state); ospf_opaque_ism_change (oi, old_state);
#endif /* HAVE_OPAQUE_LSA */
/* Check area border status. */ /* Check area border status. */
ospf_check_abr_status (oi->ospf); ospf_check_abr_status (oi->ospf);

View file

@ -2642,11 +2642,9 @@ ospf_discard_from_db (struct ospf *ospf,
ospf_ase_unregister_external_lsa (old, ospf); ospf_ase_unregister_external_lsa (old, ospf);
ospf_ls_retransmit_delete_nbr_as (ospf, old); ospf_ls_retransmit_delete_nbr_as (ospf, old);
break; break;
#ifdef HAVE_OPAQUE_LSA
case OSPF_OPAQUE_AS_LSA: case OSPF_OPAQUE_AS_LSA:
ospf_ls_retransmit_delete_nbr_as (ospf, old); ospf_ls_retransmit_delete_nbr_as (ospf, old);
break; break;
#endif /* HAVE_OPAQUE_LSA */
case OSPF_AS_NSSA_LSA: case OSPF_AS_NSSA_LSA:
ospf_ls_retransmit_delete_nbr_area (old->area, old); ospf_ls_retransmit_delete_nbr_area (old->area, old);
ospf_ase_unregister_external_lsa (old, ospf); ospf_ase_unregister_external_lsa (old, ospf);
@ -2680,9 +2678,7 @@ ospf_lsa_install (struct ospf *ospf, struct ospf_interface *oi,
lsdb = ospf->lsdb; lsdb = ospf->lsdb;
break; break;
case OSPF_AS_EXTERNAL_LSA: case OSPF_AS_EXTERNAL_LSA:
#ifdef HAVE_OPAQUE_LSA
case OSPF_OPAQUE_AS_LSA: case OSPF_OPAQUE_AS_LSA:
#endif /* HAVE_OPAQUE_LSA */
lsdb = ospf->lsdb; lsdb = ospf->lsdb;
break; break;
default: default:
@ -2794,7 +2790,6 @@ ospf_lsa_install (struct ospf *ospf, struct ospf_interface *oi,
case OSPF_AS_EXTERNAL_LSA: case OSPF_AS_EXTERNAL_LSA:
new = ospf_external_lsa_install (ospf, lsa, rt_recalc); new = ospf_external_lsa_install (ospf, lsa, rt_recalc);
break; break;
#ifdef HAVE_OPAQUE_LSA
case OSPF_OPAQUE_LINK_LSA: case OSPF_OPAQUE_LINK_LSA:
if (IS_LSA_SELF (lsa)) if (IS_LSA_SELF (lsa))
lsa->oi = oi; /* Specify outgoing ospf-interface for this 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: case OSPF_OPAQUE_AS_LSA:
new = ospf_opaque_lsa_install (lsa, rt_recalc); new = ospf_opaque_lsa_install (lsa, rt_recalc);
break; break;
#endif /* HAVE_OPAQUE_LSA */
case OSPF_AS_NSSA_LSA: case OSPF_AS_NSSA_LSA:
new = ospf_external_lsa_install (ospf, lsa, rt_recalc); new = ospf_external_lsa_install (ospf, lsa, rt_recalc);
default: /* type-6,8,9....nothing special */ 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) switch (lsa->data->type)
{ {
case OSPF_AS_EXTERNAL_LSA: case OSPF_AS_EXTERNAL_LSA:
#ifdef HAVE_OPAQUE_LSA
case OSPF_OPAQUE_AS_LSA: case OSPF_OPAQUE_AS_LSA:
#endif /* HAVE_OPAQUE_LSA */
case OSPF_AS_NSSA_LSA: case OSPF_AS_NSSA_LSA:
zlog_debug ("LSA[%s]: Install %s", zlog_debug ("LSA[%s]: Install %s",
dump_lsa_key (new), dump_lsa_key (new),
@ -3061,7 +3053,6 @@ ospf_lsa_maxage_walker_remover (struct ospf *ospf, struct ospf_lsa *lsa)
switch (lsa->data->type) switch (lsa->data->type)
{ {
#ifdef HAVE_OPAQUE_LSA
case OSPF_OPAQUE_LINK_LSA: case OSPF_OPAQUE_LINK_LSA:
case OSPF_OPAQUE_AREA_LSA: case OSPF_OPAQUE_AREA_LSA:
case OSPF_OPAQUE_AS_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. * topology, and thus, routing recalculation is not needed here.
*/ */
break; break;
#endif /* HAVE_OPAQUE_LSA */
case OSPF_AS_EXTERNAL_LSA: case OSPF_AS_EXTERNAL_LSA:
case OSPF_AS_NSSA_LSA: case OSPF_AS_NSSA_LSA:
ospf_ase_incremental_update (ospf, 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); ospf_lsa_maxage_walker_remover (ospf, lsa);
LSDB_LOOP (ASBR_SUMMARY_LSDB (area), rn, lsa) LSDB_LOOP (ASBR_SUMMARY_LSDB (area), rn, lsa)
ospf_lsa_maxage_walker_remover (ospf, lsa); ospf_lsa_maxage_walker_remover (ospf, lsa);
#ifdef HAVE_OPAQUE_LSA
LSDB_LOOP (OPAQUE_AREA_LSDB (area), rn, lsa) LSDB_LOOP (OPAQUE_AREA_LSDB (area), rn, lsa)
ospf_lsa_maxage_walker_remover (ospf, lsa); ospf_lsa_maxage_walker_remover (ospf, lsa);
LSDB_LOOP (OPAQUE_LINK_LSDB (area), rn, lsa) LSDB_LOOP (OPAQUE_LINK_LSDB (area), rn, lsa)
ospf_lsa_maxage_walker_remover (ospf, lsa); ospf_lsa_maxage_walker_remover (ospf, lsa);
#endif /* HAVE_OPAQUE_LSA */
LSDB_LOOP (NSSA_LSDB (area), rn, lsa) LSDB_LOOP (NSSA_LSDB (area), rn, lsa)
ospf_lsa_maxage_walker_remover (ospf, 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) LSDB_LOOP (EXTERNAL_LSDB (ospf), rn, lsa)
ospf_lsa_maxage_walker_remover (ospf, lsa); ospf_lsa_maxage_walker_remover (ospf, lsa);
#ifdef HAVE_OPAQUE_LSA
LSDB_LOOP (OPAQUE_AS_LSDB (ospf), rn, lsa) LSDB_LOOP (OPAQUE_AS_LSDB (ospf), rn, lsa)
ospf_lsa_maxage_walker_remover (ospf, lsa); ospf_lsa_maxage_walker_remover (ospf, lsa);
#endif /* HAVE_OPAQUE_LSA */
} }
OSPF_TIMER_ON (ospf->t_maxage_walker, ospf_lsa_maxage_walker, 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_SUMMARY_LSA:
case OSPF_ASBR_SUMMARY_LSA: case OSPF_ASBR_SUMMARY_LSA:
case OSPF_AS_NSSA_LSA: case OSPF_AS_NSSA_LSA:
#ifdef HAVE_OPAQUE_LSA
case OSPF_OPAQUE_LINK_LSA: case OSPF_OPAQUE_LINK_LSA:
case OSPF_OPAQUE_AREA_LSA: case OSPF_OPAQUE_AREA_LSA:
#endif /* HAVE_OPAQUE_LSA */
return ospf_lsdb_lookup_by_id (area->lsdb, type, id, adv_router); return ospf_lsdb_lookup_by_id (area->lsdb, type, id, adv_router);
case OSPF_AS_EXTERNAL_LSA: case OSPF_AS_EXTERNAL_LSA:
#ifdef HAVE_OPAQUE_LSA
case OSPF_OPAQUE_AS_LSA: case OSPF_OPAQUE_AS_LSA:
#endif /* HAVE_OPAQUE_LSA */
return ospf_lsdb_lookup_by_id (ospf->lsdb, type, id, adv_router); return ospf_lsdb_lookup_by_id (ospf->lsdb, type, id, adv_router);
default: default:
break; 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); return ospf_lsdb_lookup_by_id (area->lsdb, type, id, id);
case OSPF_AS_EXTERNAL_LSA: case OSPF_AS_EXTERNAL_LSA:
case OSPF_AS_NSSA_LSA: case OSPF_AS_NSSA_LSA:
#ifdef HAVE_OPAQUE_LSA
case OSPF_OPAQUE_LINK_LSA: case OSPF_OPAQUE_LINK_LSA:
case OSPF_OPAQUE_AREA_LSA: case OSPF_OPAQUE_AREA_LSA:
case OSPF_OPAQUE_AS_LSA: case OSPF_OPAQUE_AS_LSA:
/* Currently not used. */ /* Currently not used. */
break; break;
#endif /* HAVE_OPAQUE_LSA */
default: default:
break; break;
} }
@ -3249,14 +3229,12 @@ ospf_lsa_lookup_by_header (struct ospf_area *area, struct lsa_header *lsah)
{ {
struct ospf_lsa *match; struct ospf_lsa *match;
#ifdef HAVE_OPAQUE_LSA
/* /*
* Strictly speaking, the LSA-ID field for Opaque-LSAs (type-9/10/11) * Strictly speaking, the LSA-ID field for Opaque-LSAs (type-9/10/11)
* is redefined to have two subfields; opaque-type and opaque-id. * is redefined to have two subfields; opaque-type and opaque-id.
* However, it is harmless to treat the two sub fields together, as if * However, it is harmless to treat the two sub fields together, as if
* they two were forming a unique LSA-ID. * they two were forming a unique LSA-ID.
*/ */
#endif /* HAVE_OPAQUE_LSA */
match = ospf_lsa_lookup (area, lsah->type, lsah->id, lsah->adv_router); 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) switch (lsa->data->type)
{ {
#ifdef HAVE_OPAQUE_LSA
/* Opaque wants to be notified of flushes */ /* Opaque wants to be notified of flushes */
case OSPF_OPAQUE_LINK_LSA: case OSPF_OPAQUE_LINK_LSA:
case OSPF_OPAQUE_AREA_LSA: case OSPF_OPAQUE_AREA_LSA:
case OSPF_OPAQUE_AS_LSA: case OSPF_OPAQUE_AS_LSA:
ospf_opaque_lsa_refresh (lsa); ospf_opaque_lsa_refresh (lsa);
break; break;
#endif /* HAVE_OPAQUE_LSA */
default: default:
ospf_refresher_unregister_lsa (ospf, lsa); ospf_refresher_unregister_lsa (ospf, lsa);
ospf_lsa_flush (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); ospf_lsa_flush_schedule (ospf, lsa);
LSDB_LOOP (ASBR_SUMMARY_LSDB (area), rn, lsa) LSDB_LOOP (ASBR_SUMMARY_LSDB (area), rn, lsa)
ospf_lsa_flush_schedule (ospf, lsa); ospf_lsa_flush_schedule (ospf, lsa);
#ifdef HAVE_OPAQUE_LSA
LSDB_LOOP (OPAQUE_LINK_LSDB (area), rn, lsa) LSDB_LOOP (OPAQUE_LINK_LSDB (area), rn, lsa)
ospf_lsa_flush_schedule (ospf, lsa); ospf_lsa_flush_schedule (ospf, lsa);
LSDB_LOOP (OPAQUE_AREA_LSDB (area), rn, lsa) LSDB_LOOP (OPAQUE_AREA_LSDB (area), rn, lsa)
ospf_lsa_flush_schedule (ospf, lsa); ospf_lsa_flush_schedule (ospf, lsa);
#endif /* HAVE_OPAQUE_LSA */
} }
if (need_to_flush_ase) if (need_to_flush_ase)
{ {
LSDB_LOOP (EXTERNAL_LSDB (ospf), rn, lsa) LSDB_LOOP (EXTERNAL_LSDB (ospf), rn, lsa)
ospf_lsa_flush_schedule (ospf, lsa); ospf_lsa_flush_schedule (ospf, lsa);
#ifdef HAVE_OPAQUE_LSA
LSDB_LOOP (OPAQUE_AS_LSDB (ospf), rn, lsa) LSDB_LOOP (OPAQUE_AS_LSDB (ospf), rn, lsa)
ospf_lsa_flush_schedule (ospf, 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 else
ospf_lsa_flush_as (ospf, lsa); ospf_lsa_flush_as (ospf, lsa);
break; break;
#ifdef HAVE_OPAQUE_LSA
case OSPF_OPAQUE_LINK_LSA: case OSPF_OPAQUE_LINK_LSA:
case OSPF_OPAQUE_AREA_LSA: case OSPF_OPAQUE_AREA_LSA:
case OSPF_OPAQUE_AS_LSA: case OSPF_OPAQUE_AS_LSA:
new = ospf_opaque_lsa_refresh (lsa); new = ospf_opaque_lsa_refresh (lsa);
break; break;
#endif /* HAVE_OPAQUE_LSA */
default: default:
break; break;
} }

View file

@ -27,11 +27,7 @@
/* OSPF LSA Range definition. */ /* OSPF LSA Range definition. */
#define OSPF_MIN_LSA 1 /* begin range here */ #define OSPF_MIN_LSA 1 /* begin range here */
#if defined (HAVE_OPAQUE_LSA)
#define OSPF_MAX_LSA 12 #define OSPF_MAX_LSA 12
#else
#define OSPF_MAX_LSA 8
#endif
/* OSPF LSA Type definition. */ /* OSPF LSA Type definition. */
#define OSPF_UNKNOWN_LSA 0 #define OSPF_UNKNOWN_LSA 0
@ -211,9 +207,7 @@ struct as_external_lsa
} e[1]; } e[1];
}; };
#ifdef HAVE_OPAQUE_LSA
#include "ospfd/ospf_opaque.h" #include "ospfd/ospf_opaque.h"
#endif /* HAVE_OPAQUE_LSA */
/* Macros. */ /* Macros. */
#define GET_METRIC(x) get_metric(x) #define GET_METRIC(x) get_metric(x)

View file

@ -323,9 +323,7 @@ main (int argc, char **argv)
#ifdef HAVE_SNMP #ifdef HAVE_SNMP
ospf_snmp_init (); ospf_snmp_init ();
#endif /* HAVE_SNMP */ #endif /* HAVE_SNMP */
#ifdef HAVE_OPAQUE_LSA
ospf_opaque_init (); ospf_opaque_init ();
#endif /* HAVE_OPAQUE_LSA */
/* Need to initialize the default ospf structure, so the interface mode /* Need to initialize the default ospf structure, so the interface mode
commands can be duly processed if they are received before 'router ospf', commands can be duly processed if they are received before 'router ospf',

View file

@ -310,7 +310,6 @@ ospf_nbr_count (struct ospf_interface *oi, int state)
return count; return count;
} }
#ifdef HAVE_OPAQUE_LSA
int int
ospf_nbr_count_opaque_capable (struct ospf_interface *oi) ospf_nbr_count_opaque_capable (struct ospf_interface *oi)
{ {
@ -327,7 +326,6 @@ ospf_nbr_count_opaque_capable (struct ospf_interface *oi)
return count; return count;
} }
#endif /* HAVE_OPAQUE_LSA */
/* lookup nbr by address - use this only if you know you must /* lookup nbr by address - use this only if you know you must
* otherwise use the ospf_nbr_lookup() wrapper, which deals * otherwise use the ospf_nbr_lookup() wrapper, which deals

View file

@ -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_self_reset (struct ospf_interface *, struct in_addr);
extern void ospf_nbr_add_self (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); extern int ospf_nbr_count (struct ospf_interface *, int);
#ifdef HAVE_OPAQUE_LSA
extern int ospf_nbr_count_opaque_capable (struct ospf_interface *); extern int ospf_nbr_count_opaque_capable (struct ospf_interface *);
#endif /* HAVE_OPAQUE_LSA */
extern struct ospf_neighbor *ospf_nbr_get (struct ospf_interface *, extern struct ospf_neighbor *ospf_nbr_get (struct ospf_interface *,
struct ospf_header *, struct ospf_header *,
struct ip *, struct prefix *); struct ip *, struct prefix *);

View file

@ -222,7 +222,6 @@ ospf_db_summary_isempty (struct ospf_neighbor *nbr)
static int static int
ospf_db_summary_add (struct ospf_neighbor *nbr, struct ospf_lsa *lsa) ospf_db_summary_add (struct ospf_neighbor *nbr, struct ospf_lsa *lsa)
{ {
#ifdef HAVE_OPAQUE_LSA
switch (lsa->data->type) switch (lsa->data->type)
{ {
case OSPF_OPAQUE_LINK_LSA: case OSPF_OPAQUE_LINK_LSA:
@ -240,7 +239,6 @@ ospf_db_summary_add (struct ospf_neighbor *nbr, struct ospf_lsa *lsa)
default: default:
break; break;
} }
#endif /* HAVE_OPAQUE_LSA */
/* Stay away from any Local Translated Type-7 LSAs */ /* Stay away from any Local Translated Type-7 LSAs */
if (CHECK_FLAG (lsa->flags, OSPF_LSA_LOCAL_XLT)) 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) LSDB_LOOP (ASBR_SUMMARY_LSDB (area), rn, lsa)
ospf_db_summary_add (nbr, lsa); ospf_db_summary_add (nbr, lsa);
#ifdef HAVE_OPAQUE_LSA
/* Process only if the neighbor is opaque capable. */ /* Process only if the neighbor is opaque capable. */
if (CHECK_FLAG (nbr->options, OSPF_OPTION_O)) 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) LSDB_LOOP (OPAQUE_AREA_LSDB (area), rn, lsa)
ospf_db_summary_add (nbr, lsa); ospf_db_summary_add (nbr, lsa);
} }
#endif /* HAVE_OPAQUE_LSA */
if (CHECK_FLAG (nbr->options, OSPF_OPTION_NP)) 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) LSDB_LOOP (EXTERNAL_LSDB (nbr->oi->ospf), rn, lsa)
ospf_db_summary_add (nbr, lsa); ospf_db_summary_add (nbr, lsa);
#ifdef HAVE_OPAQUE_LSA
if (CHECK_FLAG (nbr->options, OSPF_OPTION_O) if (CHECK_FLAG (nbr->options, OSPF_OPTION_O)
&& (nbr->oi->type != OSPF_IFTYPE_VIRTUALLINK && (nbr->oi->type != OSPF_IFTYPE_VIRTUALLINK
&& area->external_routing == OSPF_AREA_DEFAULT)) && area->external_routing == OSPF_AREA_DEFAULT))
LSDB_LOOP (OPAQUE_AS_LSDB (nbr->oi->ospf), rn, lsa) LSDB_LOOP (OPAQUE_AS_LSDB (nbr->oi->ospf), rn, lsa)
ospf_db_summary_add (nbr, lsa); ospf_db_summary_add (nbr, lsa);
#endif /* HAVE_OPAQUE_LSA */
return 0; return 0;
} }
@ -383,10 +377,8 @@ nsm_clear_adj (struct ospf_neighbor *nbr)
if (!ospf_ls_retransmit_isempty (nbr)) if (!ospf_ls_retransmit_isempty (nbr))
ospf_ls_retransmit_clear (nbr); ospf_ls_retransmit_clear (nbr);
#ifdef HAVE_OPAQUE_LSA
if (CHECK_FLAG (nbr->options, OSPF_OPTION_O)) if (CHECK_FLAG (nbr->options, OSPF_OPTION_O))
UNSET_FLAG (nbr->options, OSPF_OPTION_O); UNSET_FLAG (nbr->options, OSPF_OPTION_O);
#endif /* HAVE_OPAQUE_LSA */
} }
static int 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); ospf_opaque_nsm_change (nbr, old_state);
#endif /* HAVE_OPAQUE_LSA */
/* State changes from > ExStart to <= ExStart should clear any Exchange /* State changes from > ExStart to <= ExStart should clear any Exchange
* or Full/LSA Update related lists and state. * or Full/LSA Update related lists and state.

View file

@ -27,7 +27,6 @@
#define MTYPE_OPAQUE_INFO_PER_ID MTYPE_TMP #define MTYPE_OPAQUE_INFO_PER_ID MTYPE_TMP
#include <zebra.h> #include <zebra.h>
#ifdef HAVE_OPAQUE_LSA
#include "linklist.h" #include "linklist.h"
#include "prefix.h" #include "prefix.h"
@ -2185,4 +2184,3 @@ oi_to_top (struct ospf_interface *oi)
return top; return top;
} }
#endif /* HAVE_OPAQUE_LSA */

View file

@ -925,7 +925,6 @@ ospf_hello (struct ip *iph, struct ospf_header *ospfh,
} }
#endif /* REJECT_IF_TBIT_ON */ #endif /* REJECT_IF_TBIT_ON */
#ifdef HAVE_OPAQUE_LSA
if (CHECK_FLAG (oi->ospf->config, OSPF_OPAQUE_CAPABLE) if (CHECK_FLAG (oi->ospf->config, OSPF_OPAQUE_CAPABLE)
&& CHECK_FLAG (hello->options, OSPF_OPTION_O)) && 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. */ UNSET_FLAG (hello->options, OSPF_OPTION_O); /* Ignore O-bit. */
#endif /* STRICT_OBIT_USAGE_CHECK */ #endif /* STRICT_OBIT_USAGE_CHECK */
} }
#endif /* HAVE_OPAQUE_LSA */
/* new for NSSA is to ensure that NP is on and E is off */ /* 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; return;
} }
#ifdef HAVE_OPAQUE_LSA
if (IS_OPAQUE_LSA (lsah->type) if (IS_OPAQUE_LSA (lsah->type)
&& ! CHECK_FLAG (nbr->options, OSPF_OPTION_O)) && ! 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); OSPF_NSM_EVENT_SCHEDULE (nbr, NSM_SeqNumberMismatch);
return; return;
} }
#endif /* HAVE_OPAQUE_LSA */
switch (lsah->type) switch (lsah->type)
{ {
case OSPF_AS_EXTERNAL_LSA: case OSPF_AS_EXTERNAL_LSA:
#ifdef HAVE_OPAQUE_LSA
case OSPF_OPAQUE_AS_LSA: case OSPF_OPAQUE_AS_LSA:
#endif /* HAVE_OPAQUE_LSA */
/* Check for stub area. Reject if AS-External from stub but /* Check for stub area. Reject if AS-External from stub but
allow if from NSSA. */ allow if from NSSA. */
if (oi->area->external_routing == OSPF_AREA_STUB) 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 */ #endif /* REJECT_IF_TBIT_ON */
#ifdef HAVE_OPAQUE_LSA
if (CHECK_FLAG (dd->options, OSPF_OPTION_O) if (CHECK_FLAG (dd->options, OSPF_OPTION_O)
&& !CHECK_FLAG (oi->ospf->config, OSPF_OPAQUE_CAPABLE)) && !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); UNSET_FLAG (dd->options, OSPF_OPTION_O);
} }
#endif /* HAVE_OPAQUE_LSA */
/* Add event to thread. */ /* Add event to thread. */
OSPF_NSM_EVENT_SCHEDULE (nbr, NSM_PacketReceived); 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 */ /* This is where the real Options are saved */
nbr->options = dd->options; nbr->options = dd->options;
#ifdef HAVE_OPAQUE_LSA
if (CHECK_FLAG (oi->ospf->config, OSPF_OPAQUE_CAPABLE)) if (CHECK_FLAG (oi->ospf->config, OSPF_OPAQUE_CAPABLE))
{ {
if (IS_DEBUG_OSPF_EVENT) 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. */ /* This situation is undesirable, but not a real error. */
} }
} }
#endif /* HAVE_OPAQUE_LSA */
OSPF_NSM_EVENT_EXECUTE (nbr, NSM_NegotiationDone); 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) if (ntohs (lsah->ls_age) > OSPF_LSA_MAXAGE)
lsah->ls_age = htons (OSPF_LSA_MAXAGE); lsah->ls_age = htons (OSPF_LSA_MAXAGE);
#ifdef HAVE_OPAQUE_LSA
if (CHECK_FLAG (nbr->options, OSPF_OPTION_O)) if (CHECK_FLAG (nbr->options, OSPF_OPTION_O))
{ {
#ifdef STRICT_OBIT_USAGE_CHECK #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)); zlog_warn ("LSA[Type%d:%s]: Opaque capability mismatch?", lsah->type, inet_ntoa (lsah->id));
continue; continue;
} }
#endif /* HAVE_OPAQUE_LSA */
/* Create OSPF LSA instance. */ /* Create OSPF LSA instance. */
lsa = ospf_lsa_new (); lsa = ospf_lsa_new ();
@ -1695,16 +1683,12 @@ ospf_ls_upd_list_lsa (struct ospf_neighbor *nbr, struct stream *s,
switch (lsah->type) switch (lsah->type)
{ {
case OSPF_AS_EXTERNAL_LSA: case OSPF_AS_EXTERNAL_LSA:
#ifdef HAVE_OPAQUE_LSA
case OSPF_OPAQUE_AS_LSA: case OSPF_OPAQUE_AS_LSA:
#endif /* HAVE_OPAQUE_LSA */
lsa->area = NULL; lsa->area = NULL;
break; break;
#ifdef HAVE_OPAQUE_LSA
case OSPF_OPAQUE_LINK_LSA: case OSPF_OPAQUE_LINK_LSA:
lsa->oi = oi; /* Remember incoming interface for flooding control. */ lsa->oi = oi; /* Remember incoming interface for flooding control. */
/* Fallthrough */ /* Fallthrough */
#endif /* HAVE_OPAQUE_LSA */
default: default:
lsa->area = oi->area; lsa->area = oi->area;
break; break;
@ -1892,7 +1876,6 @@ ospf_ls_upd (struct ospf *ospf, struct ip *iph, struct ospf_header *ospfh,
DISCARD_LSA (lsa, 3); DISCARD_LSA (lsa, 3);
} }
#ifdef HAVE_OPAQUE_LSA
if (IS_OPAQUE_LSA (lsa->data->type) if (IS_OPAQUE_LSA (lsa->data->type)
&& IPV4_ADDR_SAME (&lsa->data->adv_router, &oi->ospf->router_id)) && 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; continue;
} }
} }
#endif /* HAVE_OPAQUE_LSA */
/* It might be happen that received LSA is self-originated network LSA, but /* 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 * 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_SUMMARY_LSA:
case OSPF_ASBR_SUMMARY_LSA: case OSPF_ASBR_SUMMARY_LSA:
/* RFC2328 A.4.4, LSA header + 4 bytes followed by N>=1 4-bytes TOS blocks */ /* 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_LINK_LSA:
case OSPF_OPAQUE_AREA_LSA: case OSPF_OPAQUE_AREA_LSA:
case OSPF_OPAQUE_AS_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 * data) padded to 32-bit alignment." This is considered equivalent
* to 4-byte alignment of all other LSA types, see OSPF-ALIGNMENT.txt * to 4-byte alignment of all other LSA types, see OSPF-ALIGNMENT.txt
* file for the detailed analysis of this passage. */ * file for the detailed analysis of this passage. */
#endif
ret = lsalen % 4 ? MSG_NG : MSG_OK; ret = lsalen % 4 ? MSG_NG : MSG_OK;
break; break;
default: default:
@ -3157,10 +3137,8 @@ ospf_make_db_desc (struct ospf_interface *oi, struct ospf_neighbor *nbr,
/* Set Options. */ /* Set Options. */
options = OPTIONS (oi); options = OPTIONS (oi);
#ifdef HAVE_OPAQUE_LSA
if (CHECK_FLAG (oi->ospf->config, OSPF_OPAQUE_CAPABLE)) if (CHECK_FLAG (oi->ospf->config, OSPF_OPAQUE_CAPABLE))
SET_FLAG (options, OSPF_OPTION_O); SET_FLAG (options, OSPF_OPTION_O);
#endif /* HAVE_OPAQUE_LSA */
stream_putc (s, options); stream_putc (s, options);
/* DD flags */ /* 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)) for (rn = route_top (table); rn; rn = route_next (rn))
if ((lsa = rn->info) != NULL) if ((lsa = rn->info) != NULL)
{ {
#ifdef HAVE_OPAQUE_LSA
if (IS_OPAQUE_LSA (lsa->data->type) if (IS_OPAQUE_LSA (lsa->data->type)
&& (! CHECK_FLAG (options, OSPF_OPTION_O))) && (! 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); ospf_lsdb_delete (lsdb, lsa);
continue; continue;
} }
#endif /* HAVE_OPAQUE_LSA */
if (!CHECK_FLAG (lsa->flags, OSPF_LSA_DISCARD)) if (!CHECK_FLAG (lsa->flags, OSPF_LSA_DISCARD))
{ {

View file

@ -27,9 +27,6 @@
#include <zebra.h> #include <zebra.h>
#ifdef HAVE_OSPF_TE #ifdef HAVE_OSPF_TE
#ifndef HAVE_OPAQUE_LSA
#error "Wrong configure option"
#endif /* HAVE_OPAQUE_LSA */
#include "linklist.h" #include "linklist.h"
#include "prefix.h" #include "prefix.h"

View file

@ -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); ospf_lsdb_checksum (area->lsdb, OSPF_AS_NSSA_LSA), VTY_NEWLINE);
} }
#ifdef HAVE_OPAQUE_LSA
if (use_json) if (use_json)
{ {
json_object_int_add(json_area, "lsaOpaqueLinkNumber", ospf_lsdb_count (area->lsdb, OSPF_OPAQUE_LINK_LSA)); 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_count (area->lsdb, OSPF_OPAQUE_AREA_LSA),
ospf_lsdb_checksum (area->lsdb, OSPF_OPAQUE_AREA_LSA), VTY_NEWLINE); ospf_lsdb_checksum (area->lsdb, OSPF_OPAQUE_AREA_LSA), VTY_NEWLINE);
} }
#endif /* HAVE_OPAQUE_LSA */
if (use_json) if (use_json)
json_object_object_add(json_areas, inet_ntoa (area->area_id), json_area); 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); "enabled" : "disabled", VTY_NEWLINE);
} }
#ifdef HAVE_OPAQUE_LSA
if (use_json) if (use_json)
{ {
if (CHECK_FLAG (ospf->config, OSPF_OPAQUE_CAPABLE)) 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", CHECK_FLAG (ospf->config, OSPF_OPAQUE_CAPABLE) ? "enabled" : "disabled",
VTY_NEWLINE); VTY_NEWLINE);
} }
#endif /* HAVE_OPAQUE_LSA */
/* Show stub-router configuration */ /* Show stub-router configuration */
if (ospf->stub_router_startup_time != OSPF_STUB_ROUTER_UNCONFIGURED 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); ospf_lsdb_checksum (ospf->lsdb, OSPF_AS_EXTERNAL_LSA), VTY_NEWLINE);
} }
#ifdef HAVE_OPAQUE_LSA
if (use_json) if (use_json)
{ {
json_object_int_add(json, "lsaAsopaqueCounter", 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_count (ospf->lsdb, OSPF_OPAQUE_AS_LSA),
ospf_lsdb_checksum (ospf->lsdb, OSPF_OPAQUE_AS_LSA), VTY_NEWLINE); ospf_lsdb_checksum (ospf->lsdb, OSPF_OPAQUE_AS_LSA), VTY_NEWLINE);
} }
#endif /* HAVE_OPAQUE_LSA */
/* Show number of areas attached. */ /* Show number of areas attached. */
if (use_json) if (use_json)
@ -5095,11 +5089,9 @@ show_lsa_summary (struct vty *vty, struct ospf_lsa *lsa, int self)
break; break;
case OSPF_NETWORK_LSA: case OSPF_NETWORK_LSA:
case OSPF_ASBR_SUMMARY_LSA: case OSPF_ASBR_SUMMARY_LSA:
#ifdef HAVE_OPAQUE_LSA
case OSPF_OPAQUE_LINK_LSA: case OSPF_OPAQUE_LINK_LSA:
case OSPF_OPAQUE_AREA_LSA: case OSPF_OPAQUE_AREA_LSA:
case OSPF_OPAQUE_AS_LSA: case OSPF_OPAQUE_AS_LSA:
#endif /* HAVE_OPAQUE_LSA */
default: default:
break; break;
} }
@ -5119,12 +5111,10 @@ static const char *show_database_desc[] =
"AS External Link States", "AS External Link States",
"Group Membership LSA", "Group Membership LSA",
"NSSA-external Link States", "NSSA-external Link States",
#ifdef HAVE_OPAQUE_LSA
"Type-8 LSA", "Type-8 LSA",
"Link-Local Opaque-LSA", "Link-Local Opaque-LSA",
"Area-Local Opaque-LSA", "Area-Local Opaque-LSA",
"AS-external Opaque-LSA", "AS-external Opaque-LSA",
#endif /* HAVE_OPAQUE_LSA */
}; };
static const char *show_database_header[] = static const char *show_database_header[] =
@ -5137,12 +5127,10 @@ static const char *show_database_header[] =
"Link ID ADV Router Age Seq# CkSum Route", "Link ID ADV Router Age Seq# CkSum Route",
" --- header for Group Member ----", " --- header for Group Member ----",
"Link ID ADV Router Age Seq# CkSum Route", "Link ID ADV Router Age Seq# CkSum Route",
#ifdef HAVE_OPAQUE_LSA
" --- type-8 ---", " --- 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", "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 static void
@ -5414,7 +5402,6 @@ show_func_dummy (struct vty *vty, struct ospf_lsa *lsa)
return 0; return 0;
} }
#ifdef HAVE_OPAQUE_LSA
static int static int
show_opaque_lsa_detail (struct vty *vty, struct ospf_lsa *lsa) 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; return 0;
} }
#endif /* HAVE_OPAQUE_LSA */
int (*show_function[])(struct vty *, struct ospf_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_as_external_lsa_detail,
show_func_dummy, show_func_dummy,
show_as_nssa_lsa_detail, /* almost same as external */ show_as_nssa_lsa_detail, /* almost same as external */
#ifdef HAVE_OPAQUE_LSA
NULL, /* type-8 */ NULL, /* type-8 */
show_opaque_lsa_detail, show_opaque_lsa_detail,
show_opaque_lsa_detail, show_opaque_lsa_detail,
show_opaque_lsa_detail, show_opaque_lsa_detail,
#endif /* HAVE_OPAQUE_LSA */
}; };
static void static void
@ -5503,9 +5487,7 @@ show_lsa_detail (struct vty *vty, struct ospf *ospf, int type,
switch (type) switch (type)
{ {
case OSPF_AS_EXTERNAL_LSA: case OSPF_AS_EXTERNAL_LSA:
#ifdef HAVE_OPAQUE_LSA
case OSPF_OPAQUE_AS_LSA: case OSPF_OPAQUE_AS_LSA:
#endif /* HAVE_OPAQUE_LSA */
vty_out (vty, " %s %s%s", vty_out (vty, " %s %s%s",
show_database_desc[type], show_database_desc[type],
VTY_NEWLINE, VTY_NEWLINE); VTY_NEWLINE, VTY_NEWLINE);
@ -5552,9 +5534,7 @@ show_lsa_detail_adv_router (struct vty *vty, struct ospf *ospf, int type,
switch (type) switch (type)
{ {
case OSPF_AS_EXTERNAL_LSA: case OSPF_AS_EXTERNAL_LSA:
#ifdef HAVE_OPAQUE_LSA
case OSPF_OPAQUE_AS_LSA: case OSPF_OPAQUE_AS_LSA:
#endif /* HAVE_OPAQUE_LSA */
vty_out (vty, " %s %s%s", vty_out (vty, " %s %s%s",
show_database_desc[type], show_database_desc[type],
VTY_NEWLINE, VTY_NEWLINE); VTY_NEWLINE, VTY_NEWLINE);
@ -5590,9 +5570,7 @@ show_ip_ospf_database_summary (struct vty *vty, struct ospf *ospf, int self)
switch (type) switch (type)
{ {
case OSPF_AS_EXTERNAL_LSA: case OSPF_AS_EXTERNAL_LSA:
#ifdef HAVE_OPAQUE_LSA
case OSPF_OPAQUE_AS_LSA: case OSPF_OPAQUE_AS_LSA:
#endif /* HAVE_OPAQUE_LSA */
continue; continue;
default: default:
break; break;
@ -5619,9 +5597,7 @@ show_ip_ospf_database_summary (struct vty *vty, struct ospf *ospf, int self)
switch (type) switch (type)
{ {
case OSPF_AS_EXTERNAL_LSA: case OSPF_AS_EXTERNAL_LSA:
#ifdef HAVE_OPAQUE_LSA
case OSPF_OPAQUE_AS_LSA: case OSPF_OPAQUE_AS_LSA:
#endif /* HAVE_OPAQUE_LSA */
break; break;
default: default:
continue; 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_DESC "NSSA external link state\n"
#define OSPF_LSA_TYPE_NSSA_CMD_STR "|nssa-external" #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_LINK_DESC "Link local Opaque-LSA\n"
#define OSPF_LSA_TYPE_OPAQUE_AREA_DESC "Link area 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_AS_DESC "Link AS Opaque-LSA\n"
#define OSPF_LSA_TYPE_OPAQUE_CMD_STR "|opaque-link|opaque-area|opaque-as" #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 \ #define OSPF_LSA_TYPES_CMD_STR \
"asbr-summary|external|network|router|summary" \ "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); show_ip_ospf_database_maxage (vty, ospf);
return CMD_SUCCESS; return CMD_SUCCESS;
} }
#ifdef HAVE_OPAQUE_LSA
else if (strncmp (argv[arg_base + 0], "opaque-l", 8) == 0) else if (strncmp (argv[arg_base + 0], "opaque-l", 8) == 0)
type = OSPF_OPAQUE_LINK_LSA; type = OSPF_OPAQUE_LINK_LSA;
else if (strncmp (argv[arg_base + 0], "opaque-ar", 9) == 0) else if (strncmp (argv[arg_base + 0], "opaque-ar", 9) == 0)
type = OSPF_OPAQUE_AREA_LSA; type = OSPF_OPAQUE_AREA_LSA;
else if (strncmp (argv[arg_base + 0], "opaque-as", 9) == 0) else if (strncmp (argv[arg_base + 0], "opaque-as", 9) == 0)
type = OSPF_OPAQUE_AS_LSA; type = OSPF_OPAQUE_AS_LSA;
#endif /* HAVE_OPAQUE_LSA */
else else
return CMD_WARNING; 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; type = OSPF_ASBR_SUMMARY_LSA;
else if (strncmp (argv[arg_base + 0], "e", 1) == 0) else if (strncmp (argv[arg_base + 0], "e", 1) == 0)
type = OSPF_AS_EXTERNAL_LSA; type = OSPF_AS_EXTERNAL_LSA;
#ifdef HAVE_OPAQUE_LSA
else if (strncmp (argv[arg_base + 0], "opaque-l", 8) == 0) else if (strncmp (argv[arg_base + 0], "opaque-l", 8) == 0)
type = OSPF_OPAQUE_LINK_LSA; type = OSPF_OPAQUE_LINK_LSA;
else if (strncmp (argv[arg_base + 0], "opaque-ar", 9) == 0) else if (strncmp (argv[arg_base + 0], "opaque-ar", 9) == 0)
type = OSPF_OPAQUE_AREA_LSA; type = OSPF_OPAQUE_AREA_LSA;
else if (strncmp (argv[arg_base + 0], "opaque-as", 9) == 0) else if (strncmp (argv[arg_base + 0], "opaque-as", 9) == 0)
type = OSPF_OPAQUE_AS_LSA; type = OSPF_OPAQUE_AS_LSA;
#endif /* HAVE_OPAQUE_LSA */
else else
return CMD_WARNING; return CMD_WARNING;
@ -9489,9 +9454,7 @@ config_write_interface (struct vty *vty)
} }
} while (rn); } while (rn);
#ifdef HAVE_OPAQUE_LSA
ospf_opaque_config_write_if (vty, ifp); ospf_opaque_config_write_if (vty, ifp);
#endif /* HAVE_OPAQUE_LSA */
} }
return write; return write;
@ -9987,9 +9950,7 @@ ospf_config_write (struct vty *vty)
/* Distance configuration. */ /* Distance configuration. */
config_write_ospf_distance (vty, ospf); config_write_ospf_distance (vty, ospf);
#ifdef HAVE_OPAQUE_LSA
ospf_opaque_config_write_router (vty, ospf); ospf_opaque_config_write_router (vty, ospf);
#endif /* HAVE_OPAQUE_LSA */
} }
return write; return write;

View file

@ -351,9 +351,7 @@ ospf_get ()
if (ospf->router_id_static.s_addr == 0) if (ospf->router_id_static.s_addr == 0)
ospf_router_id_update (ospf); ospf_router_id_update (ospf);
#ifdef HAVE_OPAQUE_LSA
ospf_opaque_type11_lsa_init (ospf); ospf_opaque_type11_lsa_init (ospf);
#endif /* HAVE_OPAQUE_LSA */
} }
return ospf; return ospf;
@ -373,9 +371,7 @@ ospf_get_instance (u_short instance)
if (ospf->router_id_static.s_addr == 0) if (ospf->router_id_static.s_addr == 0)
ospf_router_id_update (ospf); ospf_router_id_update (ospf);
#ifdef HAVE_OPAQUE_LSA
ospf_opaque_type11_lsa_init (ospf); ospf_opaque_type11_lsa_init (ospf);
#endif /* HAVE_OPAQUE_LSA */
} }
return ospf; return ospf;
@ -513,9 +509,7 @@ ospf_finish_final (struct ospf *ospf)
int i; int i;
u_short instance = 0; u_short instance = 0;
#ifdef HAVE_OPAQUE_LSA
ospf_opaque_type11_lsa_term (ospf); ospf_opaque_type11_lsa_term (ospf);
#endif /* HAVE_OPAQUE_LSA */
/* be nice if this worked, but it doesn't */ /* be nice if this worked, but it doesn't */
/*ospf_flush_self_originated_lsas_now (ospf);*/ /*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_lsa_refresher);
OSPF_TIMER_OFF (ospf->t_read); OSPF_TIMER_OFF (ospf->t_read);
OSPF_TIMER_OFF (ospf->t_write); OSPF_TIMER_OFF (ospf->t_write);
#ifdef HAVE_OPAQUE_LSA
OSPF_TIMER_OFF (ospf->t_opaque_lsa_self); OSPF_TIMER_OFF (ospf->t_opaque_lsa_self);
#endif
close (ospf->fd); close (ospf->fd);
stream_free(ospf->ibuf); stream_free(ospf->ibuf);
#ifdef HAVE_OPAQUE_LSA
LSDB_LOOP (OPAQUE_AS_LSDB (ospf), rn, lsa) LSDB_LOOP (OPAQUE_AS_LSDB (ospf), rn, lsa)
ospf_discard_from_db (ospf, ospf->lsdb, lsa); ospf_discard_from_db (ospf, ospf->lsdb, lsa);
#endif /* HAVE_OPAQUE_LSA */
LSDB_LOOP (EXTERNAL_LSDB (ospf), rn, lsa) LSDB_LOOP (EXTERNAL_LSDB (ospf), rn, lsa)
ospf_discard_from_db (ospf, ospf->lsdb, 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. */ /* Self-originated LSAs initialize. */
new->router_lsa_self = NULL; new->router_lsa_self = NULL;
#ifdef HAVE_OPAQUE_LSA
ospf_opaque_type10_lsa_init (new); ospf_opaque_type10_lsa_init (new);
#endif /* HAVE_OPAQUE_LSA */
new->oiflist = list_new (); new->oiflist = list_new ();
new->ranges = route_table_init (); new->ranges = route_table_init ();
@ -764,12 +752,10 @@ ospf_area_free (struct ospf_area *area)
LSDB_LOOP (NSSA_LSDB (area), rn, lsa) LSDB_LOOP (NSSA_LSDB (area), rn, lsa)
ospf_discard_from_db (area->ospf, area->lsdb, lsa); ospf_discard_from_db (area->ospf, area->lsdb, lsa);
#ifdef HAVE_OPAQUE_LSA
LSDB_LOOP (OPAQUE_AREA_LSDB (area), rn, lsa) LSDB_LOOP (OPAQUE_AREA_LSDB (area), rn, lsa)
ospf_discard_from_db (area->ospf, area->lsdb, lsa); ospf_discard_from_db (area->ospf, area->lsdb, lsa);
LSDB_LOOP (OPAQUE_LINK_LSDB (area), rn, lsa) LSDB_LOOP (OPAQUE_LINK_LSDB (area), rn, lsa)
ospf_discard_from_db (area->ospf, area->lsdb, lsa); ospf_discard_from_db (area->ospf, area->lsdb, lsa);
#endif /* HAVE_OPAQUE_LSA */
ospf_lsdb_delete_all (area->lsdb); ospf_lsdb_delete_all (area->lsdb);
ospf_lsdb_free (area->lsdb); ospf_lsdb_free (area->lsdb);
@ -787,9 +773,7 @@ ospf_area_free (struct ospf_area *area)
/* Cancel timer. */ /* Cancel timer. */
OSPF_TIMER_OFF (area->t_stub_router); OSPF_TIMER_OFF (area->t_stub_router);
#ifdef HAVE_OPAQUE_LSA
OSPF_TIMER_OFF (area->t_opaque_lsa_self); OSPF_TIMER_OFF (area->t_opaque_lsa_self);
#endif /* HAVE_OPAQUE_LSA */
if (OSPF_IS_AREA_BACKBONE (area)) if (OSPF_IS_AREA_BACKBONE (area))
area->ospf->backbone = NULL; area->ospf->backbone = NULL;

View file

@ -162,11 +162,9 @@ struct ospf
#define OSPF_LOG_ADJACENCY_CHANGES (1 << 3) #define OSPF_LOG_ADJACENCY_CHANGES (1 << 3)
#define OSPF_LOG_ADJACENCY_DETAIL (1 << 4) #define OSPF_LOG_ADJACENCY_DETAIL (1 << 4)
#ifdef HAVE_OPAQUE_LSA
/* Opaque-LSA administrative flags. */ /* Opaque-LSA administrative flags. */
u_char opaque; u_char opaque;
#define OPAQUE_OPERATION_READY_BIT (1 << 0) #define OPAQUE_OPERATION_READY_BIT (1 << 0)
#endif /* HAVE_OPAQUE_LSA */
/* RFC3137 stub router. Configured time to stay stub / max-metric */ /* RFC3137 stub router. Configured time to stay stub / max-metric */
unsigned int stub_router_startup_time; /* seconds */ unsigned int stub_router_startup_time; /* seconds */
@ -209,9 +207,7 @@ struct ospf
int external_origin; /* AS-external-LSA origin flag. */ int external_origin; /* AS-external-LSA origin flag. */
int ase_calc; /* ASE calculation flag. */ int ase_calc; /* ASE calculation flag. */
#ifdef HAVE_OPAQUE_LSA
struct list *opaque_lsa_self; /* Type-11 Opaque-LSAs */ struct list *opaque_lsa_self; /* Type-11 Opaque-LSAs */
#endif /* HAVE_OPAQUE_LSA */
/* Routing tables. */ /* Routing tables. */
struct route_table *old_table; /* Old routing table. */ 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_spf_calc; /* SPF calculation timer. */
struct thread *t_ase_calc; /* ASE calculation timer. */ struct thread *t_ase_calc; /* ASE calculation timer. */
struct thread *t_external_lsa; /* AS-external-LSA origin 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. */ 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 */ unsigned int maxage_delay; /* Delay on Maxage remover timer, sec */
struct thread *t_maxage; /* MaxAge LSA remover timer. */ struct thread *t_maxage; /* MaxAge LSA remover timer. */
@ -365,9 +359,7 @@ struct ospf_area
/* Self-originated LSAs. */ /* Self-originated LSAs. */
struct ospf_lsa *router_lsa_self; struct ospf_lsa *router_lsa_self;
#ifdef HAVE_OPAQUE_LSA
struct list *opaque_lsa_self; /* Type-10 Opaque-LSAs */ struct list *opaque_lsa_self; /* Type-10 Opaque-LSAs */
#endif /* HAVE_OPAQUE_LSA */
/* Area announce list. */ /* Area announce list. */
struct struct
@ -409,9 +401,7 @@ struct ospf_area
/* Threads. */ /* Threads. */
struct thread *t_stub_router; /* Stub-router timer */ struct thread *t_stub_router; /* Stub-router timer */
#ifdef HAVE_OPAQUE_LSA
struct thread *t_opaque_lsa_self; /* Type-10 Opaque-LSAs origin. */ struct thread *t_opaque_lsa_self; /* Type-10 Opaque-LSAs origin. */
#endif /* HAVE_OPAQUE_LSA */
/* Statistics field. */ /* Statistics field. */
u_int32_t spf_calculation; /* SPF Calculation Count. */ u_int32_t spf_calculation; /* SPF Calculation Count. */