diff options
author | hasso <hasso> | 2004-06-20 21:00:27 +0000 |
---|---|---|
committer | hasso <hasso> | 2004-06-20 21:00:27 +0000 |
commit | beebba75167b33e05b5e02a41179ad0c13a0bcd7 (patch) | |
tree | 83b72a338e29f7f6cff2b83fd2c71e8615f9f8e5 | |
parent | 320ec10a24d8dd81d0aa011dc92e07877e4e02f8 (diff) |
Remove ifdef's HAVE_NSSA. NSSA support is stable enough.
-rwxr-xr-x | configure.ac | 9 | ||||
-rw-r--r-- | ospfd/ChangeLog | 4 | ||||
-rw-r--r-- | ospfd/ospf_abr.c | 20 | ||||
-rw-r--r-- | ospfd/ospf_apiserver.c | 2 | ||||
-rw-r--r-- | ospfd/ospf_ase.c | 7 | ||||
-rw-r--r-- | ospfd/ospf_dump.c | 10 | ||||
-rw-r--r-- | ospfd/ospf_flood.c | 25 | ||||
-rw-r--r-- | ospfd/ospf_ia.c | 8 | ||||
-rw-r--r-- | ospfd/ospf_interface.c | 2 | ||||
-rw-r--r-- | ospfd/ospf_lsa.c | 59 | ||||
-rw-r--r-- | ospfd/ospf_lsa.h | 8 | ||||
-rw-r--r-- | ospfd/ospf_nsm.c | 2 | ||||
-rw-r--r-- | ospfd/ospf_packet.c | 14 | ||||
-rw-r--r-- | ospfd/ospf_packet.h | 3 | ||||
-rw-r--r-- | ospfd/ospf_route.c | 10 | ||||
-rw-r--r-- | ospfd/ospf_route.h | 2 | ||||
-rw-r--r-- | ospfd/ospf_te.c | 2 | ||||
-rw-r--r-- | ospfd/ospf_vty.c | 62 | ||||
-rw-r--r-- | ospfd/ospfd.c | 10 | ||||
-rw-r--r-- | ospfd/ospfd.h | 6 |
20 files changed, 15 insertions, 250 deletions
diff --git a/configure.ac b/configure.ac index 0ea64b9f..21294212 100755 --- a/configure.ac +++ b/configure.ac @@ -5,7 +5,7 @@ ## Copyright (c) 1996, 97, 98, 99, 2000 Kunihiro Ishiguro <kunihiro@zebra.org> ## Portions Copyright (c) 2003 Paul Jakma <paul@dishone.st> ## -## $Id: configure.ac,v 1.52 2004/06/12 14:33:05 hasso Exp $ +## $Id: configure.ac,v 1.53 2004/06/20 21:00:27 hasso Exp $ AC_PREREQ(2.53) AC_INIT(quagga, 0.96.5, [http://bugzilla.quagga.net]) @@ -97,9 +97,6 @@ AC_ARG_WITH(libpam, [ --with-libpam use libpam for PAM support in vtysh]) AC_ARG_ENABLE(tcp-zebra, [ --enable-tcp-zebra enable TCP/IP socket connection between zebra and protocol daemon]) -dnl Temporary option until OSPF NSSA implementation complete -AC_ARG_ENABLE(nssa, -[ --enable-nssa enable OSPF NSSA option]) AC_ARG_ENABLE(opaque-lsa, [ --enable-opaque-lsa enable OSPF Opaque-LSA with OSPFAPI support (RFC2370)]) AC_ARG_ENABLE(ospfapi, @@ -144,10 +141,6 @@ if test "${enable_tcp_zebra}" = "yes"; then AC_DEFINE(HAVE_TCP_ZEBRA,,Use TCP for zebra communication) fi -if test "${enable_nssa}" = "yes"; then - AC_DEFINE(HAVE_NSSA,,OSPF NSSA) -fi - if test "${enable_opaque_lsa}" = "yes"; then AC_DEFINE(HAVE_OPAQUE_LSA,,OSPF Opaque LSA) fi diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog index 7048b5e8..26f1fa02 100644 --- a/ospfd/ChangeLog +++ b/ospfd/ChangeLog @@ -1,3 +1,7 @@ +2004-06-10 Hasso Tepper <hasso@estpak.ee> + + * *: Removed ifdefs HAVE_NSSA. + 2004-06-06 Paul Jakma <paul@dishone.st> * ospf_dump.c,ospf_lsa.c: Fix typos of merge of previous. diff --git a/ospfd/ospf_abr.c b/ospfd/ospf_abr.c index 359e3bac..21bd6738 100644 --- a/ospfd/ospf_abr.c +++ b/ospfd/ospf_abr.c @@ -347,7 +347,6 @@ ospf_act_bb_connection (struct ospf *ospf) return ospf->backbone->full_nbrs; } -#ifdef HAVE_NSSA /* Determine whether this router is elected translator or not for area */ int ospf_abr_nssa_am_elected (struct ospf_area *area) @@ -472,7 +471,6 @@ ospf_abr_nssa_check_status (struct ospf *ospf) } } } -#endif /* HAVE_NSSA */ /* Check area border router status. */ void @@ -604,7 +602,6 @@ set_metric (struct ospf_lsa *lsa, u_int32_t metric) memcpy(header->metric, mp, 3); } -#ifdef HAVE_NSSA int ospf_abr_check_nssa_range (struct prefix_ipv4 *p, u_int32_t cost, struct ospf_area *area) @@ -710,7 +707,6 @@ ospf_abr_translate_nssa_range (struct prefix_ipv4 *p, u_int32_t cost) /* The Type-7 is created from the aggregated prefix and forwarded for lsa installation and flooding... to be added... */ } -#endif /* HAVE_NSSA */ void ospf_abr_announce_network_to_area (struct prefix_ipv4 *p, u_int32_t cost, @@ -945,7 +941,6 @@ ospf_abr_should_announce (struct ospf *ospf, return 1; } -#ifdef HAVE_NSSA void ospf_abr_process_nssa_translates (struct ospf *ospf) { @@ -985,7 +980,6 @@ ospf_abr_process_nssa_translates (struct ospf *ospf) zlog_info ("ospf_abr_process_nssa_translates(): Stop"); } -#endif /* HAVE_NSSA */ void ospf_abr_process_network_rt (struct ospf *ospf, @@ -1303,7 +1297,6 @@ ospf_abr_process_router_rt (struct ospf *ospf, struct route_table *rt) zlog_info ("ospf_abr_process_router_rt(): Stop"); } -#ifdef HAVE_NSSA void ospf_abr_unapprove_translates (struct ospf *ospf) /* For NSSA Translations */ { @@ -1329,7 +1322,6 @@ ospf_abr_unapprove_translates (struct ospf *ospf) /* For NSSA Translations */ if (IS_DEBUG_OSPF_NSSA) zlog_info ("ospf_abr_unapprove_translates(): Stop"); } -#endif /* HAVE_NSSA */ void ospf_abr_unapprove_summaries (struct ospf *ospf) @@ -1484,7 +1476,6 @@ ospf_abr_announce_aggregates (struct ospf *ospf) zlog_info ("ospf_abr_announce_aggregates(): Stop"); } -#ifdef HAVE_NSSA void ospf_abr_send_nssa_aggregates (struct ospf *ospf) /* temporarily turned off */ { @@ -1592,7 +1583,6 @@ ospf_abr_announce_nssa_defaults (struct ospf *ospf) /* By ABR-Translator */ } } } -#endif /* HAVE_NSSA */ void ospf_abr_announce_stub_defaults (struct ospf *ospf) @@ -1619,9 +1609,7 @@ ospf_abr_announce_stub_defaults (struct ospf *ospf) inet_ntoa (area->area_id)); if ( (area->external_routing != OSPF_AREA_STUB) -#ifdef HAVE_NSSA && (area->external_routing != OSPF_AREA_NSSA) -#endif /* HAVE_NSSA */ ) continue; @@ -1639,7 +1627,6 @@ ospf_abr_announce_stub_defaults (struct ospf *ospf) zlog_info ("ospf_abr_announce_stub_defaults(): Stop"); } -#ifdef HAVE_NSSA int ospf_abr_remove_unapproved_translates_apply (struct ospf *ospf, struct ospf_lsa *lsa) @@ -1676,7 +1663,6 @@ ospf_abr_remove_unapproved_translates (struct ospf *ospf) if (IS_DEBUG_OSPF_NSSA) zlog_info ("ospf_abr_remove_unapproved_translates(): Stop"); } -#endif /* HAVE_NSSA */ void ospf_abr_remove_unapproved_summaries (struct ospf *ospf) @@ -1734,7 +1720,6 @@ ospf_abr_manage_discard_routes (struct ospf *ospf) } } -#ifdef HAVE_NSSA /* This is the function taking care about ABR NSSA, i.e. NSSA Translator, -LSA aggregation and flooding. For all NSSAs @@ -1821,7 +1806,6 @@ ospf_abr_nssa_task (struct ospf *ospf) /* called only if any_nssa */ if (IS_DEBUG_OSPF_NSSA) zlog_info ("ospf_abr_nssa_task(): Stop"); } -#endif /* HAVE_NSSA */ /* This is the function taking care about ABR stuff, i.e. summary-LSA origination and flooding. */ @@ -1887,14 +1871,10 @@ ospf_abr_task_timer (struct thread *thread) zlog_info ("Running ABR task on timer"); ospf_check_abr_status (ospf); -#ifdef HAVE_NSSA ospf_abr_nssa_check_status (ospf); -#endif /* HAVE_NSSA */ ospf_abr_task (ospf); -#ifdef HAVE_NSSA ospf_abr_nssa_task (ospf); /* if nssa-abr, then scan Type-7 LSDB */ -#endif /* HAVE_NSSA */ return 0; } diff --git a/ospfd/ospf_apiserver.c b/ospfd/ospf_apiserver.c index 545060c9..6ee1c00b 100644 --- a/ospfd/ospf_apiserver.c +++ b/ospfd/ospf_apiserver.c @@ -1495,9 +1495,7 @@ ospf_apiserver_opaque_lsa_new (struct ospf_area *area, if (area) { options = LSA_OPTIONS_GET (area); -#ifdef HAVE_NSSA options |= LSA_OPTIONS_NSSA_GET (area); -#endif /* HAVE_NSSA */ } options |= OSPF_OPTION_O; /* Don't forget to set option bit */ diff --git a/ospfd/ospf_ase.c b/ospfd/ospf_ase.c index db43e102..c7b343c3 100644 --- a/ospfd/ospf_ase.c +++ b/ospfd/ospf_ase.c @@ -293,7 +293,6 @@ ospf_ase_calculate_route (struct ospf *ospf, struct ospf_lsa * lsa) assert (lsa); al = (struct as_external_lsa *) lsa->data; -#ifdef HAVE_NSSA if (lsa->data->type == OSPF_AS_NSSA_LSA) if (IS_DEBUG_OSPF_NSSA) zlog_info ("ospf_ase_calc(): Processing Type-7"); @@ -305,7 +304,6 @@ ospf_ase_calculate_route (struct ospf *ospf, struct ospf_lsa * lsa) zlog_info ("ospf_ase_calc(): Rejecting Local Xlt'd"); return 0; } -#endif /* HAVE_NSSA */ zlog_info ("Route[External]: Calculate AS-external-LSA to %s/%d", inet_ntoa (al->header.id), ip_masklen (al->mask)); @@ -613,10 +611,8 @@ ospf_ase_calculate_timer (struct thread *t) struct ospf *ospf; struct ospf_lsa *lsa; struct route_node *rn; -#ifdef HAVE_NSSA listnode node; struct ospf_area *area; -#endif /* HAVE_NSSA */ ospf = THREAD_ARG (t); ospf->t_ase_calc = NULL; @@ -629,7 +625,6 @@ ospf_ase_calculate_timer (struct thread *t) LSDB_LOOP (EXTERNAL_LSDB (ospf), rn, lsa) ospf_ase_calculate_route (ospf, lsa); -#ifdef HAVE_NSSA /* This version simple adds to the table all NSSA areas */ if (ospf->anyNSSA) for (node = listhead (ospf->areas); node; nextnode (node)) @@ -647,8 +642,6 @@ ospf_ase_calculate_timer (struct thread *t) LSDB_LOOP (NSSA_LSDB (ospf),rn,lsa) ospf_ase_calculate_route(ospf,lsa); -#endif /* HAVE_NSSA */ - /* Compare old and new external routing table and install the difference info zebra/kernel */ ospf_ase_compare_tables (ospf->new_external_route, diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c index 9ea67558..c94fda15 100644 --- a/ospfd/ospf_dump.c +++ b/ospfd/ospf_dump.c @@ -562,11 +562,9 @@ ospf_packet_ls_upd_dump (struct stream *s, u_int16_t length) case OSPF_AS_EXTERNAL_LSA: ospf_as_external_lsa_dump (s, length); break; -#ifdef HAVE_NSSA case OSPF_AS_NSSA_LSA: ospf_as_external_lsa_dump (s, length); break; -#endif /* HAVE_NSSA */ #ifdef HAVE_OPAQUE_LSA case OSPF_OPAQUE_LINK_LSA: case OSPF_OPAQUE_AREA_LSA: @@ -1624,9 +1622,7 @@ debug_init () install_element (ENABLE_NODE, &debug_ospf_zebra_sub_cmd); install_element (ENABLE_NODE, &debug_ospf_zebra_cmd); install_element (ENABLE_NODE, &debug_ospf_event_cmd); -#ifdef HAVE_NSSA install_element (ENABLE_NODE, &debug_ospf_nssa_cmd); -#endif /* HAVE_NSSA */ install_element (ENABLE_NODE, &no_debug_ospf_packet_send_recv_detail_cmd); install_element (ENABLE_NODE, &no_debug_ospf_packet_send_recv_cmd); install_element (ENABLE_NODE, &no_debug_ospf_packet_all_cmd); @@ -1639,9 +1635,7 @@ debug_init () install_element (ENABLE_NODE, &no_debug_ospf_zebra_sub_cmd); install_element (ENABLE_NODE, &no_debug_ospf_zebra_cmd); install_element (ENABLE_NODE, &no_debug_ospf_event_cmd); -#ifdef HAVE_NSSA install_element (ENABLE_NODE, &no_debug_ospf_nssa_cmd); -#endif /* HAVE_NSSA */ install_element (CONFIG_NODE, &debug_ospf_packet_send_recv_detail_cmd); install_element (CONFIG_NODE, &debug_ospf_packet_send_recv_cmd); @@ -1655,9 +1649,7 @@ debug_init () install_element (CONFIG_NODE, &debug_ospf_zebra_sub_cmd); install_element (CONFIG_NODE, &debug_ospf_zebra_cmd); install_element (CONFIG_NODE, &debug_ospf_event_cmd); -#ifdef HAVE_NSSA install_element (CONFIG_NODE, &debug_ospf_nssa_cmd); -#endif /* HAVE_NSSA */ install_element (CONFIG_NODE, &no_debug_ospf_packet_send_recv_detail_cmd); install_element (CONFIG_NODE, &no_debug_ospf_packet_send_recv_cmd); install_element (CONFIG_NODE, &no_debug_ospf_packet_all_cmd); @@ -1670,7 +1662,5 @@ debug_init () install_element (CONFIG_NODE, &no_debug_ospf_zebra_sub_cmd); install_element (CONFIG_NODE, &no_debug_ospf_zebra_cmd); install_element (CONFIG_NODE, &no_debug_ospf_event_cmd); -#ifdef HAVE_NSSA install_element (CONFIG_NODE, &no_debug_ospf_nssa_cmd); -#endif /* HAVE_NSSA */ } diff --git a/ospfd/ospf_flood.c b/ospfd/ospf_flood.c index d077a7d1..b706279e 100644 --- a/ospfd/ospf_flood.c +++ b/ospfd/ospf_flood.c @@ -184,7 +184,6 @@ ospf_process_self_originated_lsa (struct ospf *ospf, ospf_schedule_abr_task (ospf); break; case OSPF_AS_EXTERNAL_LSA : -#ifdef HAVE_NSSA case OSPF_AS_NSSA_LSA: if ( (new->data->type == OSPF_AS_EXTERNAL_LSA) && CHECK_FLAG (new->flags, OSPF_LSA_LOCAL_XLT)) @@ -192,7 +191,6 @@ ospf_process_self_originated_lsa (struct ospf *ospf, ospf_translated_nssa_refresh (ospf, NULL, new); return; } -#endif /* HAVE_NSSA */ ei = ospf_external_info_check (new); if (ei) ospf_external_lsa_refresh (ospf, new, ei, LSA_REFRESH_FORCE); @@ -513,11 +511,9 @@ ospf_flood_through_interface (struct ospf_interface *oi, received the LSA already. */ if (NBR_IS_DR (inbr) || NBR_IS_BDR (inbr)) { -#ifdef HAVE_NSSA if (IS_DEBUG_OSPF_NSSA) zlog_info ("ospf_flood_through_interface(): " "DR/BDR NOT SEND to int %s", IF_NAME (oi)); -#endif /* HAVE_NSSA */ return 1; } @@ -529,11 +525,9 @@ ospf_flood_through_interface (struct ospf_interface *oi, if (oi->state == ISM_Backup) { -#ifdef HAVE_NSSA if (IS_DEBUG_OSPF_NSSA) zlog_info ("ospf_flood_through_interface(): " "ISM_Backup NOT SEND to int %s", IF_NAME (oi)); -#endif /* HAVE_NSSA */ return 1; } } @@ -544,17 +538,10 @@ ospf_flood_through_interface (struct ospf_interface *oi, (which must be > 0) when it is copied into the outgoing Link State Update packet (until the LS age field reaches the maximum value of MaxAge). */ - -#ifdef HAVE_NSSA + /* XXX HASSO: Is this IS_DEBUG_OSPF_NSSA really correct? */ if (IS_DEBUG_OSPF_NSSA) zlog_info ("ospf_flood_through_interface(): " "DR/BDR sending upd to int %s", IF_NAME (oi)); -#else /* ! HAVE_NSSA */ - - if (IS_DEBUG_OSPF_EVENT) - zlog_info ("ospf_flood_through_interface(): " - "sending upd to int %s", IF_NAME (oi)); -#endif /* HAVE_NSSA */ /* RFC2328 Section 13.3 On non-broadcast networks, separate Link State Update @@ -637,11 +624,9 @@ ospf_flood_through_as (struct ospf *ospf, struct ospf_neighbor *inbr, interfaces are all the router's interfaces, excluding virtual links and those interfaces attaching to stub areas. */ -#ifdef HAVE_NSSA if (CHECK_FLAG (lsa->flags, OSPF_LSA_LOCAL_XLT)) /* Translated from 7 */ if (IS_DEBUG_OSPF_NSSA) zlog_info ("Flood/AS: NSSA TRANSLATED LSA"); -#endif /* HAVE_NSSA */ for (node = listhead (ospf->areas); node; nextnode (node)) { @@ -656,7 +641,6 @@ ospf_flood_through_as (struct ospf *ospf, struct ospf_neighbor *inbr, here. NSSA's will receive Type-7's that have areas matching the originl LSA. */ case OSPF_AREA_NSSA: /* Sending Type 5 or 7 into NSSA area */ -#ifdef HAVE_NSSA /* Type-7, flood NSSA area */ if (lsa->data->type == OSPF_AS_NSSA_LSA && area == lsa->area) @@ -665,7 +649,6 @@ ospf_flood_through_as (struct ospf *ospf, struct ospf_neighbor *inbr, else continue_flag = 1; /* Skip this NSSA area for Type-5's et al */ break; -#endif /* HAVE_NSSA */ case OSPF_AREA_TYPE_MAX: case OSPF_AREA_STUB: @@ -674,12 +657,10 @@ ospf_flood_through_as (struct ospf *ospf, struct ospf_neighbor *inbr, case OSPF_AREA_DEFAULT: default: -#ifdef HAVE_NSSA /* No Type-7 into normal area */ if (lsa->data->type == OSPF_AS_NSSA_LSA) continue_flag = 1; /* skip Type-7 */ else -#endif /* HAVE_NSSA */ continue_flag = 0; /* Do this area. */ break; } @@ -737,7 +718,6 @@ ospf_flood_through (struct ospf *ospf, #endif /* HAVE_OPAQUE_LSA */ lsa_ack_flag = ospf_flood_through_as (ospf, inbr, lsa); break; -#ifdef HAVE_NSSA /* Type-7 Only received within NSSA, then flooded */ case OSPF_AS_NSSA_LSA: /* Any P-bit was installed with the Type-7. */ @@ -746,7 +726,6 @@ ospf_flood_through (struct ospf *ospf, if (IS_DEBUG_OSPF_NSSA) zlog_info ("ospf_flood_through: LOCAL NSSA FLOOD of Type-7."); break; -#endif /* HAVE_NSSA */ default: break; } @@ -771,7 +750,6 @@ ospf_flood_through (struct ospf *ospf, #endif /* HAVE_OPAQUE_LSA */ lsa_ack_flag = ospf_flood_through_as (ospf, inbr, lsa); break; -#ifdef HAVE_NSSA /* Type-7 Only received within NSSA, then flooded */ case OSPF_AS_NSSA_LSA: /* Any P-bit was installed with the Type-7. */ @@ -779,7 +757,6 @@ ospf_flood_through (struct ospf *ospf, if (IS_DEBUG_OSPF_NSSA) zlog_info ("ospf_flood_through: LOCAL NSSA FLOOD of Type-7."); /* Fallthrough */ -#endif /* HAVE_NSSA */ default: lsa_ack_flag = ospf_flood_through_area (lsa->area, inbr, lsa); break; diff --git a/ospfd/ospf_ia.c b/ospfd/ospf_ia.c index e4c14686..bea26575 100644 --- a/ospfd/ospf_ia.c +++ b/ospfd/ospf_ia.c @@ -265,9 +265,7 @@ process_summary_lsa (struct ospf_area *area, struct route_table *rt, new_or->u.std.origin = (struct lsa_header *) sl; new_or->cost = abr_or->cost + metric; new_or->u.std.area_id = area->area_id; -#ifdef HAVE_NSSA new_or->u.std.external_routing = area->external_routing; -#endif /* HAVE_NSSA */ new_or->path_type = OSPF_PATH_INTER_AREA; if (sl->header.type == OSPF_SUMMARY_LSA) @@ -349,9 +347,7 @@ ospf_update_network_route (struct ospf *ospf, new_or->u.std.origin = (struct lsa_header *) lsa; new_or->cost = cost; new_or->u.std.area_id = area->area_id; -#ifdef HAVE_NSSA new_or->u.std.external_routing = area->external_routing; -#endif /* HAVE_NSSA */ new_or->path_type = OSPF_PATH_INTER_AREA; ospf_route_add (rt, p, new_or, abr_or); @@ -424,9 +420,7 @@ ospf_update_network_route (struct ospf *ospf, { or->path_type = OSPF_PATH_INTER_AREA; or->u.std.area_id = area->area_id; -#ifdef HAVE_NSSA or->u.std.external_routing = area->external_routing; -#endif /* HAVE_NSSA */ /* Note that we can do this only in Shortcut ABR mode, because standard ABR must leave the route type and area unchanged @@ -495,9 +489,7 @@ ospf_update_router_route (struct ospf *ospf, new_or->u.std.origin = (struct lsa_header *)lsa; new_or->cost = cost; new_or->u.std.area_id = area->area_id; -#ifdef HAVE_NSSA new_or->u.std.external_routing = area->external_routing; -#endif /* HAVE_NSSA */ new_or->path_type = OSPF_PATH_INTER_AREA; new_or->u.std.flags = ROUTER_LSA_EXTERNAL; ospf_ia_router_route (ospf, rtrs, p, new_or, abr_or); diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c index 4787ca6f..fcc70e3b 100644 --- a/ospfd/ospf_interface.c +++ b/ospfd/ospf_interface.c @@ -292,12 +292,10 @@ ospf_if_cleanup (struct ospf_interface *oi) case OSPF_AREA_STUB: UNSET_FLAG (oi->nbr_self->options, OSPF_OPTION_E); break; -#ifdef HAVE_NSSA case OSPF_AREA_NSSA: UNSET_FLAG (oi->nbr_self->options, OSPF_OPTION_E); SET_FLAG (oi->nbr_self->options, OSPF_OPTION_NP); break; -#endif /* HAVE_NSSA */ } ospf_lsa_unlock (oi->network_lsa_self); diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c index d4cb5fde..60c7aada 100644 --- a/ospfd/ospf_lsa.c +++ b/ospfd/ospf_lsa.c @@ -447,14 +447,12 @@ router_lsa_flags (struct ospf_area *area) if (IS_OSPF_ABR (area->ospf)) { SET_FLAG (flags, ROUTER_LSA_BORDER); -#ifdef HAVE_NSSA /* If Area is NSSA and we are both ABR and unconditional translator, * set Nt bit to inform other routers. */ if ( (area->external_routing == OSPF_AREA_NSSA) && (area->NSSATranslatorRole == OSPF_NSSA_ROLE_ALWAYS)) SET_FLAG (flags, ROUTER_LSA_NT); -#endif /* HAVE_NSSA */ } return flags; } @@ -741,13 +739,8 @@ ospf_router_lsa_new (struct ospf_area *area) s = stream_new (OSPF_MAX_LSA_SIZE); lsah = (struct lsa_header *) STREAM_DATA (s); -#ifdef HAVE_NSSA /* Set LSA common header fields. */ lsa_header_set (s, LSA_OPTIONS_GET (area) | LSA_OPTIONS_NSSA_GET (area), -#else /* ! HAVE_NSSA */ - /* Set LSA common header fields. */ - lsa_header_set (s, LSA_OPTIONS_GET (area), -#endif /* HAVE_NSSA */ OSPF_ROUTER_LSA, ospf->router_id, ospf->router_id); /* Set router-LSA body fields. */ @@ -1428,7 +1421,6 @@ ospf_external_lsa_nexthop_get (struct ospf *ospf, struct in_addr nexthop) return fwd; } -#ifdef HAVE_NSSA /* NSSA-external-LSA related functions. */ /* Get 1st IP connection for Forward Addr */ @@ -1479,8 +1471,7 @@ ospf_get_nssa_ip (struct ospf_area *area) return fwd; } -#endif /* HAVE_NSSA */ - + #define DEFAULT_DEFAULT_METRIC 20 #define DEFAULT_DEFAULT_ORIGINATE_METRIC 10 #define DEFAULT_DEFAULT_ALWAYS_METRIC 1 @@ -1620,7 +1611,6 @@ ospf_external_lsa_new (struct ospf *ospf, return new; } -#ifdef HAVE_NSSA /* As Type-7 */ void ospf_install_flood_nssa (struct ospf *ospf, @@ -1942,7 +1932,6 @@ ospf_translated_nssa_refresh (struct ospf *ospf, struct ospf_lsa *type7, return new; } -#endif /* HAVE_NSSA */ int is_prefix_default (struct prefix_ipv4 *p) @@ -2019,13 +2008,11 @@ ospf_external_lsa_originate (struct ospf *ospf, struct external_info *ei) /* Flooding new LSA. only to AS (non-NSSA/STUB) */ ospf_flood_through_as (ospf, NULL, new); -#ifdef HAVE_NSSA /* If there is any attached NSSA, do special handling */ if (ospf->anyNSSA && /* stay away from translated LSAs! */ !(CHECK_FLAG (new->flags, OSPF_LSA_LOCAL_XLT))) ospf_install_flood_nssa (ospf, new, ei); /* Install/Flood Type-7 to all NSSAs */ -#endif /* HAVE_NSSA */ /* Debug logging. */ if (IS_DEBUG_OSPF (lsa, LSA_GENERATE)) @@ -2121,7 +2108,6 @@ ospf_default_originate_timer (struct thread *thread) return 0; } -#ifdef HAVE_NSSA /* Flush any NSSA LSAs for given prefix */ void ospf_nssa_lsa_flush (struct ospf *ospf, struct prefix_ipv4 *p) @@ -2152,7 +2138,6 @@ ospf_nssa_lsa_flush (struct ospf *ospf, struct prefix_ipv4 *p) } } } -#endif /* HAVE_NSSA */ /* Flush an AS-external-LSA from LSDB and routing domain. */ void @@ -2174,14 +2159,13 @@ ospf_external_lsa_flush (struct ospf *ospf, inet_ntoa (p->prefix), p->prefixlen); return; } -#ifdef HAVE_NSSA + /* If LSA is selforiginated, not a translated LSA, and there is * NSSA area, flush Type-7 LSA's at first. */ if (IS_LSA_SELF(lsa) && (ospf->anyNSSA) && !(CHECK_FLAG (lsa->flags, OSPF_LSA_LOCAL_XLT))) ospf_nssa_lsa_flush (ospf, p); -#endif /* HAVE_NSSA */ /* Sweep LSA from Link State Retransmit List. */ ospf_ls_retransmit_delete_nbr_as (ospf, lsa); @@ -2324,19 +2308,15 @@ ospf_external_lsa_refresh (struct ospf *ospf, struct ospf_lsa *lsa, /* Flood LSA through AS. */ ospf_flood_through_as (ospf, NULL, new); -#ifdef HAVE_NSSA /* If any attached NSSA, install as Type-7, flood to all NSSA Areas */ if (ospf->anyNSSA && !(CHECK_FLAG (new->flags, OSPF_LSA_LOCAL_XLT))) ospf_install_flood_nssa (ospf, new, ei); /* Install/Flood per new rules */ -#endif /* HAVE_NSSA */ /* Register self-originated LSA to refresh queue. * Translated LSAs should not be registered, but refreshed upon * refresh of the Type-7 */ -#ifdef HAVE_NSSA if ( !CHECK_FLAG (new->flags, OSPF_LSA_LOCAL_XLT) ) -#endif ospf_refresher_register_lsa (ospf, new); /* Debug logging. */ @@ -2507,7 +2487,6 @@ ospf_external_lsa_install (struct ospf *ospf, struct ospf_lsa *new, ospf_ase_incremental_update (ospf, new); } -#ifdef HAVE_NSSA if (new->data->type == OSPF_AS_NSSA_LSA) { /* There is no point to register selforiginate Type-7 LSA for @@ -2523,17 +2502,11 @@ ospf_external_lsa_install (struct ospf *ospf, struct ospf_lsa *new, ospf_translated_nssa_refresh (ospf, new, NULL); } } -#endif /* HAVE_NSSA */ /* Register self-originated LSA to refresh queue. * Leave Translated LSAs alone if NSSA is enabled */ - if (IS_LSA_SELF (new) -#ifdef HAVE_NSSA - && !CHECK_FLAG (new->flags, OSPF_LSA_LOCAL_XLT ) -#endif /* HAVE_NSSA */ - ) - + if (IS_LSA_SELF (new) && !CHECK_FLAG (new->flags, OSPF_LSA_LOCAL_XLT ) ) ospf_refresher_register_lsa (ospf, new); return new; @@ -2562,12 +2535,10 @@ ospf_discard_from_db (struct ospf *ospf, ospf_ls_retransmit_delete_nbr_as (ospf, old); ospf_ase_unregister_external_lsa (old, ospf); break; -#ifdef HAVE_NSSA case OSPF_AS_NSSA_LSA: ospf_ls_retransmit_delete_nbr_area (old->area, old); ospf_ase_unregister_external_lsa (old, ospf); - break; -#endif /* HAVE_NSSA */ + break; default: ospf_ls_retransmit_delete_nbr_area (old->area, old); break; @@ -2589,7 +2560,6 @@ ospf_lsa_install (struct ospf *ospf, struct ospf_interface *oi, /* Set LSDB. */ switch (lsa->data->type) { -#ifdef HAVE_NSSA /* kevinm */ case OSPF_AS_NSSA_LSA: if (lsa->area) @@ -2597,7 +2567,6 @@ ospf_lsa_install (struct ospf *ospf, struct ospf_interface *oi, else lsdb = ospf->lsdb; break; -#endif /* HAVE_NSSA */ case OSPF_AS_EXTERNAL_LSA: #ifdef HAVE_OPAQUE_LSA case OSPF_OPAQUE_AS_LSA: @@ -2724,10 +2693,8 @@ ospf_lsa_install (struct ospf *ospf, struct ospf_interface *oi, new = ospf_opaque_lsa_install (lsa, rt_recalc); break; #endif /* HAVE_OPAQUE_LSA */ -#ifdef HAVE_NSSA case OSPF_AS_NSSA_LSA: new = ospf_external_lsa_install (ospf, lsa, rt_recalc); -#endif /* HAVE_NSSA */ default: /* type-6,8,9....nothing special */ break; } @@ -2746,9 +2713,7 @@ ospf_lsa_install (struct ospf *ospf, struct ospf_interface *oi, #ifdef HAVE_OPAQUE_LSA case OSPF_OPAQUE_AS_LSA: #endif /* HAVE_OPAQUE_LSA */ -#ifdef HAVE_NSSA - case OSPF_AS_NSSA_LSA: -#endif /* HAVE_NSSA */ + case OSPF_AS_NSSA_LSA: zlog_info ("LSA[%s]: Install %s", dump_lsa_key (new), LOOKUP (ospf_lsa_type_msg, new->data->type)); @@ -2817,9 +2782,7 @@ ospf_maxage_flood (struct ospf_lsa *lsa) case OSPF_NETWORK_LSA: case OSPF_SUMMARY_LSA: case OSPF_ASBR_SUMMARY_LSA: -#ifdef HAVE_NSSA case OSPF_AS_NSSA_LSA: -#endif /* HAVE_NSSA */ #ifdef HAVE_OPAQUE_LSA case OSPF_OPAQUE_LINK_LSA: case OSPF_OPAQUE_AREA_LSA: @@ -2953,11 +2916,9 @@ ospf_lsa_maxage (struct ospf *ospf, struct ospf_lsa *lsa) int ospf_lsa_maxage_walker_remover (struct ospf *ospf, struct ospf_lsa *lsa) { -#ifdef HAVE_NSSA /* Stay away from any Local Translated Type-7 LSAs */ if (CHECK_FLAG (lsa->flags, OSPF_LSA_LOCAL_XLT)) return 0; -#endif /* HAVE_NSSA */ if (IS_LSA_MAXAGE (lsa)) /* Self-originated LSAs should NOT time-out instead, @@ -2984,9 +2945,7 @@ ospf_lsa_maxage_walker_remover (struct ospf *ospf, struct ospf_lsa *lsa) break; #endif /* HAVE_OPAQUE_LSA */ case OSPF_AS_EXTERNAL_LSA: -#ifdef HAVE_NSSA - case OSPF_AS_NSSA_LSA: -#endif /* HAVE_NSSA */ + case OSPF_AS_NSSA_LSA: ospf_ase_incremental_update (ospf, lsa); break; default: @@ -3028,10 +2987,8 @@ ospf_lsa_maxage_walker (struct thread *thread) LSDB_LOOP (OPAQUE_LINK_LSDB (area), rn, lsa) ospf_lsa_maxage_walker_remover (ospf, lsa); #endif /* HAVE_OPAQUE_LSA */ -#ifdef HAVE_NSSA LSDB_LOOP (NSSA_LSDB (area), rn, lsa) ospf_lsa_maxage_walker_remover (ospf, lsa); -#endif /* HAVE_NSSA */ } /* for AS-external-LSAs. */ @@ -3094,9 +3051,7 @@ ospf_lsa_lookup (struct ospf_area *area, u_int32_t type, case OSPF_NETWORK_LSA: case OSPF_SUMMARY_LSA: case OSPF_ASBR_SUMMARY_LSA: -#ifdef HAVE_NSSA case OSPF_AS_NSSA_LSA: -#endif /* HAVE_NSSA */ #ifdef HAVE_OPAQUE_LSA case OSPF_OPAQUE_LINK_LSA: case OSPF_OPAQUE_AREA_LSA: @@ -3619,13 +3574,11 @@ ospf_lsa_refresh (struct ospf *ospf, struct ospf_lsa *lsa) ospf_summary_asbr_lsa_refresh (ospf, lsa); break; case OSPF_AS_EXTERNAL_LSA: -#ifdef HAVE_NSSA /* Translated from NSSA Type-5s are refreshed when * from refresh of Type-7 - do not refresh these directly. */ if (CHECK_FLAG (lsa->flags, OSPF_LSA_LOCAL_XLT)) break; -#endif /* HAVE_NSSA */ ei = ospf_external_info_check (lsa); if (ei) ospf_external_lsa_refresh (ospf, lsa, ei, LSA_REFRESH_FORCE); diff --git a/ospfd/ospf_lsa.h b/ospfd/ospf_lsa.h index 021d6a48..6d60b579 100644 --- a/ospfd/ospf_lsa.h +++ b/ospfd/ospf_lsa.h @@ -27,10 +27,8 @@ #define OSPF_MIN_LSA 1 /* begin range here */ #if defined (HAVE_OPAQUE_LSA) #define OSPF_MAX_LSA 12 -#elif defined (HAVE_NSSA) -#define OSPF_MAX_LSA 8 #else -#define OSPF_MAX_LSA 6 +#define OSPF_MAX_LSA 8 #endif /* OSPF LSA Type definition. */ @@ -77,9 +75,7 @@ struct ospf_lsa #define OSPF_LSA_RECEIVED 0x04 #define OSPF_LSA_APPROVED 0x08 #define OSPF_LSA_DISCARD 0x10 -#ifdef HAVE_NSSA #define OSPF_LSA_LOCAL_XLT 0x20 -#endif /* HAVE_NSSA */ #define OSPF_LSA_PREMATURE_AGE 0x40 /* LSA data. */ @@ -320,12 +316,10 @@ int is_prefix_default (struct prefix_ipv4 *); int metric_type (struct ospf *, u_char); int metric_value (struct ospf *, u_char); -#ifdef HAVE_NSSA struct in_addr ospf_get_nssa_ip (struct ospf_area *); int ospf_translated_nssa_compare (struct ospf_lsa *, struct ospf_lsa *); struct ospf_lsa *ospf_translated_nssa_refresh (struct ospf *, struct ospf_lsa *, struct ospf_lsa *); struct ospf_lsa *ospf_translated_nssa_originate (struct ospf *, struct ospf_lsa *); -#endif #endif /* _ZEBRA_OSPF_LSA_H */ diff --git a/ospfd/ospf_nsm.c b/ospfd/ospf_nsm.c index a8efdcc1..14c75df5 100644 --- a/ospfd/ospf_nsm.c +++ b/ospfd/ospf_nsm.c @@ -244,11 +244,9 @@ ospf_db_summary_add (struct ospf_neighbor *nbr, struct ospf_lsa *lsa) } #endif /* HAVE_OPAQUE_LSA */ -#ifdef HAVE_NSSA /* Stay away from any Local Translated Type-7 LSAs */ if (CHECK_FLAG (lsa->flags, OSPF_LSA_LOCAL_XLT)) return 0; -#endif /* HAVE_NSSA */ if (IS_LSA_MAXAGE (lsa)) ospf_ls_retransmit_add (nbr, lsa); diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index e6b2ea7c..5692db62 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -707,7 +707,6 @@ ospf_hello (struct ip *iph, struct ospf_header *ospfh, /* new for NSSA is to ensure that NP is on and E is off */ -#ifdef HAVE_NSSA if (oi->area->external_routing == OSPF_AREA_NSSA) { if (! (CHECK_FLAG (OPTIONS (oi), OSPF_OPTION_NP) @@ -722,7 +721,6 @@ ospf_hello (struct ip *iph, struct ospf_header *ospfh, zlog_info ("NSSA-Hello:RECV:Packet from %s:", inet_ntoa(ospfh->router_id)); } else -#endif /* HAVE_NSSA */ /* The setting of the E-bit found in the Hello Packet's Options field must match this area's ExternalRoutingCapability A mismatch causes processing to stop and the packet to be @@ -873,13 +871,9 @@ ospf_db_desc_proc (struct stream *s, struct ospf_interface *oi, #ifdef HAVE_OPAQUE_LSA case OSPF_OPAQUE_AS_LSA: #endif /* HAVE_OPAQUE_LSA */ -#ifdef HAVE_NSSA /* Check for stub area. Reject if AS-External from stub but allow if from NSSA. */ if (oi->area->external_routing == OSPF_AREA_STUB) -#else /* ! HAVE_NSSA */ - if (oi->area->external_routing != OSPF_AREA_DEFAULT) -#endif /* HAVE_NSSA */ { zlog_warn ("Packet [DD:RECV]: LSA[Type%d:%s] from %s area.", lsah->type, inet_ntoa (lsah->id), @@ -985,7 +979,6 @@ ospf_db_desc (struct ip *iph, struct ospf_header *ospfh, return; } -#ifdef HAVE_NSSA /* * XXX HACK by Hasso Tepper. Setting N/P bit in NSSA area DD packets is not * required. In fact at least JunOS sends DD packets with P bit clear. @@ -1008,7 +1001,6 @@ ospf_db_desc (struct ip *iph, struct ospf_header *ospfh, inet_ntoa (nbr->router_id) ); SET_FLAG (dd->options, OSPF_OPTION_NP); } -#endif /* HAVE_NSSA */ #ifdef REJECT_IF_TBIT_ON if (CHECK_FLAG (dd->options, OSPF_OPTION_T)) @@ -1518,7 +1510,6 @@ ospf_ls_upd (struct ip *iph, struct ospf_header *ospfh, lsa = getdata (node); -#ifdef HAVE_NSSA if (IS_DEBUG_OSPF_NSSA) { char buf1[INET_ADDRSTRLEN]; @@ -1534,7 +1525,6 @@ ospf_ls_upd (struct ip *iph, struct ospf_header *ospfh, inet_ntop (AF_INET, &lsa->data->adv_router, buf3, INET_ADDRSTRLEN)); } -#endif /* HAVE_NSSA */ listnode_delete (lsas, lsa); /* We don't need it in list anymore */ @@ -1558,13 +1548,10 @@ ospf_ls_upd (struct ip *iph, struct ospf_header *ospfh, if (nbr->oi->area->external_routing != OSPF_AREA_DEFAULT) { DISCARD_LSA (lsa, 1); -#ifdef HAVE_NSSA if (IS_DEBUG_OSPF_NSSA) zlog_info("Incoming External LSA Discarded: We are NSSA/STUB Area"); -#endif /* HAVE_NSSA */ } -#ifdef HAVE_NSSA if (lsa->data->type == OSPF_AS_NSSA_LSA) if (nbr->oi->area->external_routing != OSPF_AREA_NSSA) { @@ -1572,7 +1559,6 @@ ospf_ls_upd (struct ip *iph, struct ospf_header *ospfh, if (IS_DEBUG_OSPF_NSSA) zlog_info("Incoming NSSA LSA Discarded: Not NSSA Area"); } -#endif /* HAVE_NSSA */ /* Find the LSA in the current database. */ diff --git a/ospfd/ospf_packet.h b/ospfd/ospf_packet.h index 81a104c6..a439aa39 100644 --- a/ospfd/ospf_packet.h +++ b/ospfd/ospf_packet.h @@ -42,10 +42,7 @@ #define OSPF_SEND_PACKET_DIRECT 1 #define OSPF_SEND_PACKET_INDIRECT 2 - -#ifdef HAVE_NSSA #define OSPF_SEND_PACKET_LOOP 3 -#endif /* HAVE_NSSA */ #define OSPF_HELLO_REPLY_DELAY 1 diff --git a/ospfd/ospf_route.c b/ospfd/ospf_route.c index d56b5658..a8ee232f 100644 --- a/ospfd/ospf_route.c +++ b/ospfd/ospf_route.c @@ -319,9 +319,7 @@ ospf_intra_route_add (struct route_table *rt, struct vertex *v, or->id = v->id; or->u.std.area_id = area->area_id; -#ifdef HAVE_NSSA or->u.std.external_routing= area->external_routing; -#endif /* HAVE_NSSA */ or->path_type = OSPF_PATH_INTRA_AREA; or->cost = v->distance; @@ -376,9 +374,7 @@ ospf_intra_add_router (struct route_table *rt, struct vertex *v, or->id = v->id; or->u.std.area_id = area->area_id; -#ifdef HAVE_NSSA or->u.std.external_routing = area->external_routing; -#endif /* HAVE_NSSA */ or->path_type = OSPF_PATH_INTRA_AREA; or->cost = v->distance; or->type = OSPF_DESTINATION_ROUTER; @@ -471,9 +467,7 @@ ospf_intra_add_transit (struct route_table *rt, struct vertex *v, or->id = v->id; or->u.std.area_id = area->area_id; -#ifdef HAVE_NSSA or->u.std.external_routing = area->external_routing; -#endif /* HAVE_NSSA */ or->path_type = OSPF_PATH_INTRA_AREA; or->cost = v->distance; or->type = OSPF_DESTINATION_NETWORK; @@ -603,9 +597,7 @@ ospf_intra_add_stub (struct route_table *rt, struct router_lsa_link *link, or->id = v->id; or->u.std.area_id = area->area_id; -#ifdef HAVE_NSSA or->u.std.external_routing = area->external_routing; -#endif /* HAVE_NSSA */ or->path_type = OSPF_PATH_INTRA_AREA; or->cost = cost; or->type = OSPF_DESTINATION_NETWORK; @@ -1029,9 +1021,7 @@ ospf_add_discard_route (struct route_table *rt, struct ospf_area *area, new_or->id.s_addr = 0; new_or->cost = 0; new_or->u.std.area_id = area->area_id; -#ifdef HAVE_NSSA new_or->u.std.external_routing = area->external_routing; -#endif /* HAVE_NSSA */ new_or->path_type = OSPF_PATH_INTER_AREA; rn->info = new_or; diff --git a/ospfd/ospf_route.h b/ospfd/ospf_route.h index 8d05be22..802aac6c 100644 --- a/ospfd/ospf_route.h +++ b/ospfd/ospf_route.h @@ -62,10 +62,8 @@ struct route_standard /* Associated Area. */ struct in_addr area_id; /* The area the route belongs to */ -#ifdef HAVE_NSSA /* Area Type */ int external_routing; -#endif /* HAVE_NSSA */ /* Optional Capability. */ u_char options; /* Get from LSA header. */ diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c index 0d455ec7..1a9946d4 100644 --- a/ospfd/ospf_te.c +++ b/ospfd/ospf_te.c @@ -878,9 +878,7 @@ ospf_mpls_te_lsa_new (struct ospf_area *area, struct mpls_te_link *lp) lsah = (struct lsa_header *) STREAM_DATA (s); options = LSA_OPTIONS_GET (area); -#ifdef HAVE_NSSA options |= LSA_OPTIONS_NSSA_GET (area); -#endif /* HAVE_NSSA */ options |= OSPF_OPTION_O; /* Don't forget this :-) */ lsa_type = OSPF_OPAQUE_AREA_LSA; diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index 2b2c000e..c930817a 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -675,20 +675,12 @@ ospf_find_vl_data (struct ospf *ospf, struct ospf_vl_config_data *vl_config) if (vl_config->format == OSPF_AREA_ID_FORMAT_ADDRESS) vty_out (vty, "Area %s is %s%s", inet_ntoa (area_id), -#ifdef HAVE_NSSA area->external_routing == OSPF_AREA_NSSA?"nssa":"stub", -#else - "stub", -#endif /* HAVE_NSSA */ VTY_NEWLINE); else vty_out (vty, "Area %ld is %s%s", (u_long)ntohl (area_id.s_addr), -#ifdef HAVE_NSSA area->external_routing == OSPF_AREA_NSSA?"nssa":"stub", -#else - "stub", -#endif /* HAVE_NSSA */ VTY_NEWLINE); return NULL; } @@ -1478,7 +1470,6 @@ DEFUN (no_ospf_area_stub_no_summary, return CMD_SUCCESS; } -#ifdef HAVE_NSSA int ospf_area_nssa_cmd_handler (struct vty *vty, int argc, char **argv, int nosum) { @@ -1619,8 +1610,6 @@ DEFUN (no_ospf_area_nssa_no_summary, return CMD_SUCCESS; } -#endif /* HAVE_NSSA */ - DEFUN (ospf_area_default_cost, ospf_area_default_cost_cmd, "area (A.B.C.D|<0-4294967295>) default-cost <0-16777215>", @@ -2370,13 +2359,10 @@ show_ip_ospf_area (struct vty *vty, struct ospf_area *area) area->no_summary ? ", no summary" : "", area->shortcut_configured ? "; " : ""); -#ifdef HAVE_NSSA - else if (area->external_routing == OSPF_AREA_NSSA) vty_out (vty, " (NSSA%s%s)", area->no_summary ? ", no summary" : "", area->shortcut_configured ? "; " : ""); -#endif /* HAVE_NSSA */ vty_out (vty, "%s", VTY_NEWLINE); vty_out (vty, " Shortcutting mode: %s", @@ -2390,7 +2376,6 @@ show_ip_ospf_area (struct vty *vty, struct ospf_area *area) "Active: %d%s", listcount (area->oiflist), area->act_ints, VTY_NEWLINE); -#ifdef HAVE_NSSA if (area->external_routing == OSPF_AREA_NSSA) { vty_out (vty, " It is an NSSA configuration. %s Elected NSSA/ABR performs type-7/type-5 LSA translation. %s", VTY_NEWLINE, VTY_NEWLINE); @@ -2418,7 +2403,6 @@ show_ip_ospf_area (struct vty *vty, struct ospf_area *area) VTY_NEWLINE); } } -#endif /* HAVE_NSSA */ /* Show number of fully adjacent neighbors. */ vty_out (vty, " Number of fully adjacent neighbors in this area:" @@ -3119,9 +3103,7 @@ show_lsa_summary (struct vty *vty, struct ospf_lsa *lsa, int self) vty_out (vty, " %s/%d", inet_ntoa (p.prefix), p.prefixlen); break; case OSPF_AS_EXTERNAL_LSA: -#ifdef HAVE_NSSA case OSPF_AS_NSSA_LSA: -#endif /* HAVE_NSSA */ asel = (struct as_external_lsa *) lsa->data; p.family = AF_INET; @@ -3158,10 +3140,8 @@ char *show_database_desc[] = "Summary Link States", "ASBR-Summary Link States", "AS External Link States", -#if defined (HAVE_NSSA) || defined (HAVE_OPAQUE_LSA) "Group Membership LSA", "NSSA-external Link States", -#endif /* HAVE_NSSA */ #ifdef HAVE_OPAQUE_LSA "Type-8 LSA", "Link-Local Opaque-LSA", @@ -3181,15 +3161,9 @@ char *show_database_header[] = "Link ID ADV Router Age Seq# CkSum Route", "Link ID ADV Router Age Seq# CkSum", "Link ID ADV Router Age Seq# CkSum Route", -#ifdef HAVE_NSSA " --- header for Group Member ----", "Link ID ADV Router Age Seq# CkSum Route", -#endif /* HAVE_NSSA */ #ifdef HAVE_OPAQUE_LSA -#ifndef HAVE_NSSA - " --- type-6 ---", - " --- type-7 ---", -#endif /* HAVE_NSSA */ " --- type-8 ---", "Opaque-Type/Id ADV Router Age Seq# CkSum", "Opaque-Type/Id ADV Router Age Seq# CkSum", @@ -3204,9 +3178,7 @@ char *show_lsa_flags[] = "Received", "Approved", "Discard", -#ifdef HAVE_NSSA "Translated", -#endif }; void @@ -3221,11 +3193,7 @@ show_ip_ospf_database_header (struct vty *vty, struct ospf_lsa *lsa) VTY_NEWLINE); vty_out (vty, " LS Flags: 0x%-2x %s%s", lsa->flags, -#ifdef HAVE_NSSA ((lsa->flags & OSPF_LSA_LOCAL_XLT) ? "(Translated from Type-7)" : ""), -#else - "", -#endif /* HAVE_NSSA */ VTY_NEWLINE); if (lsa->data->type == OSPF_ROUTER_LSA) @@ -3421,7 +3389,6 @@ show_as_external_lsa_detail (struct vty *vty, struct ospf_lsa *lsa) return 0; } -#ifdef HAVE_NSSA int show_as_external_lsa_stdvty (struct ospf_lsa *lsa) { @@ -3474,8 +3441,6 @@ show_as_nssa_lsa_detail (struct vty *vty, struct ospf_lsa *lsa) return 0; } -#endif /* HAVE_NSSA */ - int show_func_dummy (struct vty *vty, struct ospf_lsa *lsa) { @@ -3505,15 +3470,9 @@ int (*show_function[])(struct vty *, struct ospf_lsa *) = show_summary_lsa_detail, show_summary_asbr_lsa_detail, show_as_external_lsa_detail, -#ifdef HAVE_NSSA show_func_dummy, show_as_nssa_lsa_detail, /* almost same as external */ -#endif /* HAVE_NSSA */ #ifdef HAVE_OPAQUE_LSA -#ifndef HAVE_NSSA - show_func_dummy, - show_func_dummy, -#endif /* HAVE_NSSA */ NULL, /* type-8 */ show_opaque_lsa_detail, show_opaque_lsa_detail, @@ -3608,10 +3567,8 @@ show_lsa_detail_adv_router_proc (struct vty *vty, struct route_table *rt, if ((lsa = rn->info)) if (IPV4_ADDR_SAME (adv_router, &lsa->data->adv_router)) { -#ifdef HAVE_NSSA if (CHECK_FLAG (lsa->flags, OSPF_LSA_LOCAL_XLT)) continue; -#endif /* HAVE_NSSA */ if (show_function[lsa->data->type] != NULL) show_function[lsa->data->type] (vty, lsa); } @@ -3743,13 +3700,8 @@ show_ip_ospf_database_maxage (struct vty *vty, struct ospf *ospf) } } -#ifdef HAVE_NSSA #define OSPF_LSA_TYPE_NSSA_DESC "NSSA external link state\n" #define OSPF_LSA_TYPE_NSSA_CMD_STR "|nssa-external" -#else /* HAVE_NSSA */ -#define OSPF_LSA_TYPE_NSSA_DESC "" -#define OSPF_LSA_TYPE_NSSA_CMD_STR "" -#endif /* HAVE_NSSA */ #ifdef HAVE_OPAQUE_LSA #define OSPF_LSA_TYPE_OPAQUE_LINK_DESC "Link local Opaque-LSA\n" @@ -3810,10 +3762,8 @@ DEFUN (show_ip_ospf_database, type = OSPF_ROUTER_LSA; else if (strncmp (argv[0], "ne", 2) == 0) type = OSPF_NETWORK_LSA; -#ifdef HAVE_NSSA else if (strncmp (argv[0], "ns", 2) == 0) type = OSPF_AS_NSSA_LSA; -#endif /* HAVE_NSSA */ else if (strncmp (argv[0], "su", 2) == 0) type = OSPF_SUMMARY_LSA; else if (strncmp (argv[0], "a", 1) == 0) @@ -3946,10 +3896,8 @@ DEFUN (show_ip_ospf_database_type_adv_router, type = OSPF_ROUTER_LSA; else if (strncmp (argv[0], "ne", 2) == 0) type = OSPF_NETWORK_LSA; -#ifdef HAVE_NSSA else if (strncmp (argv[0], "ns", 2) == 0) type = OSPF_AS_NSSA_LSA; -#endif /* HAVE_NSSA */ else if (strncmp (argv[0], "s", 1) == 0) type = OSPF_SUMMARY_LSA; else if (strncmp (argv[0], "a", 1) == 0) @@ -6625,7 +6573,6 @@ show_ip_ospf_route_external (struct vty *vty, struct route_table *rt) vty_out (vty, "%s", VTY_NEWLINE); } -#ifdef HAVE_NSSA DEFUN (show_ip_ospf_border_routers, show_ip_ospf_border_routers_cmd, "show ip ospf border-routers", @@ -6657,7 +6604,6 @@ DEFUN (show_ip_ospf_border_routers, return CMD_SUCCESS; } -#endif /* HAVE_NSSA */ DEFUN (show_ip_ospf_route, show_ip_ospf_route_cmd, @@ -6976,14 +6922,11 @@ config_write_ospf_area (struct vty *vty, struct ospf *ospf) VTY_NEWLINE); if ((area->external_routing == OSPF_AREA_STUB) -#ifdef HAVE_NSSA || (area->external_routing == OSPF_AREA_NSSA) -#endif /* HAVE_NSSA */ ) { if (area->external_routing == OSPF_AREA_STUB) vty_out (vty, " area %s stub", buf); -#ifdef HAVE_NSSA else if (area->external_routing == OSPF_AREA_NSSA) { vty_out (vty, " area %s nssa", buf); @@ -7000,7 +6943,6 @@ config_write_ospf_area (struct vty *vty, struct ospf *ospf) vty_out (vty, " translate-candidate"); } } -#endif /* HAVE_NSSA */ if (area->no_summary) vty_out (vty, " no-summary"); @@ -7405,10 +7347,8 @@ ospf_vty_show_init () /* "show ip ospf route" commands. */ install_element (VIEW_NODE, &show_ip_ospf_route_cmd); install_element (ENABLE_NODE, &show_ip_ospf_route_cmd); -#ifdef HAVE_NSSA install_element (VIEW_NODE, &show_ip_ospf_border_routers_cmd); install_element (ENABLE_NODE, &show_ip_ospf_border_routers_cmd); -#endif /* HAVE_NSSA */ } @@ -7718,7 +7658,6 @@ ospf_vty_init () install_element (OSPF_NODE, &no_ospf_area_stub_no_summary_cmd); install_element (OSPF_NODE, &no_ospf_area_stub_cmd); -#ifdef HAVE_NSSA /* "area nssa" commands. */ install_element (OSPF_NODE, &ospf_area_nssa_cmd); install_element (OSPF_NODE, &ospf_area_nssa_translate_no_summary_cmd); @@ -7726,7 +7665,6 @@ ospf_vty_init () install_element (OSPF_NODE, &ospf_area_nssa_no_summary_cmd); install_element (OSPF_NODE, &no_ospf_area_nssa_cmd); install_element (OSPF_NODE, &no_ospf_area_nssa_no_summary_cmd); -#endif /* HAVE_NSSA */ install_element (OSPF_NODE, &ospf_area_default_cost_cmd); install_element (OSPF_NODE, &no_ospf_area_default_cost_cmd); diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index 3cf93a67..04b34fb7 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -503,10 +503,8 @@ ospf_area_free (struct ospf_area *area) LSDB_LOOP (ASBR_SUMMARY_LSDB (area), rn, lsa) ospf_discard_from_db (area->ospf, area->lsdb, lsa); -#ifdef HAVE_NSSA LSDB_LOOP (NSSA_LSDB (area), rn, lsa) ospf_discard_from_db (area->ospf, area->lsdb, lsa); -#endif /* HAVE_NSSA */ #ifdef HAVE_OPAQUE_LSA LSDB_LOOP (OPAQUE_AREA_LSDB (area), rn, lsa) ospf_discard_from_db (area->ospf, area->lsdb, lsa); @@ -825,12 +823,10 @@ ospf_network_run (struct ospf *ospf, struct prefix *p, struct ospf_area *area) case OSPF_AREA_STUB: UNSET_FLAG (oi->nbr_self->options, OSPF_OPTION_E); break; -#ifdef HAVE_NSSA case OSPF_AREA_NSSA: UNSET_FLAG (oi->nbr_self->options, OSPF_OPTION_E); SET_FLAG (oi->nbr_self->options, OSPF_OPTION_NP); break; -#endif /* HAVE_NSSA */ } ospf_area_add_if (oi->area, oi); @@ -983,9 +979,7 @@ ospf_area_type_set (struct ospf_area *area, int type) if ((oi = getdata (node)) != NULL) if (oi->nbr_self != NULL) { -#ifdef HAVE_NSSA UNSET_FLAG (oi->nbr_self->options, OSPF_OPTION_NP); -#endif /* HAVE_NSSA */ SET_FLAG (oi->nbr_self->options, OSPF_OPTION_E); } break; @@ -996,9 +990,7 @@ ospf_area_type_set (struct ospf_area *area, int type) { if (IS_DEBUG_OSPF_EVENT) zlog_info ("setting options on %s accordingly", IF_NAME (oi)); -#ifdef HAVE_NSSA UNSET_FLAG (oi->nbr_self->options, OSPF_OPTION_NP); -#endif /* HAVE_NSSA */ UNSET_FLAG (oi->nbr_self->options, OSPF_OPTION_E); if (IS_DEBUG_OSPF_EVENT) zlog_info ("options set on %s: %x", @@ -1006,7 +998,6 @@ ospf_area_type_set (struct ospf_area *area, int type) } break; case OSPF_AREA_NSSA: -#ifdef HAVE_NSSA for (node = listhead (area->oiflist); node; nextnode (node)) if ((oi = getdata (node)) != NULL) if (oi->nbr_self != NULL) @@ -1016,7 +1007,6 @@ ospf_area_type_set (struct ospf_area *area, int type) SET_FLAG (oi->nbr_self->options, OSPF_OPTION_NP); zlog_info ("options set on %s: %x", IF_NAME (oi), OPTIONS (oi)); } -#endif /* HAVE_NSSA */ break; default: break; diff --git a/ospfd/ospfd.h b/ospfd/ospfd.h index 23a83ff7..988f4388 100644 --- a/ospfd/ospfd.h +++ b/ospfd/ospfd.h @@ -69,9 +69,9 @@ #define OSPF_ALLSPFROUTERS 0xe0000005 /* 224.0.0.5 */ #define OSPF_ALLDROUTERS 0xe0000006 /* 224.0.0.6 */ -#ifdef HAVE_NSSA +/* XXX Where is this used? And why it was used only if compiled with + * NSSA support. */ #define OSPF_LOOPer 0x7f000000 /* 127.0.0.0 */ -#endif /* HAVE_NSSA */ #define OSPF_AREA_BACKBONE 0x00000000 /* 0.0.0.0 */ @@ -473,10 +473,8 @@ struct ospf_nbr_nbma #define LSA_OPTIONS_GET(area) \ (((area)->external_routing == OSPF_AREA_DEFAULT) ? OSPF_OPTION_E : 0) -#ifdef HAVE_NSSA #define LSA_OPTIONS_NSSA_GET(area) \ (((area)->external_routing == OSPF_AREA_NSSA) ? OSPF_OPTION_NP : 0) -#endif /* HAVE_NSSA */ #define OSPF_TIMER_ON(T,F,V) \ do { \ |