mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 07:48:07 +00:00
ospfd: remove unused code
The code for nssa_range and other bits that were written but never used.
This commit is contained in:
parent
840faaeb00
commit
a80e20d175
@ -614,15 +614,6 @@ set_metric (struct ospf_lsa *lsa, u_int32_t metric)
|
|||||||
memcpy(header->metric, mp, 3);
|
memcpy(header->metric, mp, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
ospf_abr_check_nssa_range (struct prefix_ipv4 *p, u_int32_t cost,
|
|
||||||
struct ospf_area *area)
|
|
||||||
{
|
|
||||||
/* The Type-7 is tested against the aggregated prefix and forwarded
|
|
||||||
for lsa installation and flooding */
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ospf_abr_translate_nssa */
|
/* ospf_abr_translate_nssa */
|
||||||
static int
|
static int
|
||||||
ospf_abr_translate_nssa (struct ospf_area *area, struct ospf_lsa *lsa)
|
ospf_abr_translate_nssa (struct ospf_area *area, struct ospf_lsa *lsa)
|
||||||
@ -1577,42 +1568,6 @@ ospf_abr_send_nssa_aggregates (struct ospf *ospf) /* temporarily turned off */
|
|||||||
zlog_debug ("ospf_abr_send_nssa_aggregates(): Stop");
|
zlog_debug ("ospf_abr_send_nssa_aggregates(): Stop");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
ospf_abr_announce_nssa_defaults (struct ospf *ospf) /* By ABR-Translator */
|
|
||||||
{
|
|
||||||
struct listnode *node;
|
|
||||||
struct ospf_area *area;
|
|
||||||
|
|
||||||
if (! IS_OSPF_ABR (ospf))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (IS_DEBUG_OSPF_NSSA)
|
|
||||||
zlog_debug ("ospf_abr_announce_stub_defaults(): Start");
|
|
||||||
|
|
||||||
for (ALL_LIST_ELEMENTS_RO (ospf->areas, node, area))
|
|
||||||
{
|
|
||||||
if (IS_DEBUG_OSPF_NSSA)
|
|
||||||
zlog_debug ("ospf_abr_announce_nssa_defaults(): looking at area %s",
|
|
||||||
inet_ntoa (area->area_id));
|
|
||||||
|
|
||||||
if (area->external_routing != OSPF_AREA_NSSA)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (OSPF_IS_AREA_BACKBONE (area))
|
|
||||||
continue; /* Sanity Check */
|
|
||||||
|
|
||||||
/* if (!TranslatorRole continue V 1.0 look for "always" conf */
|
|
||||||
if (area->NSSATranslatorState)
|
|
||||||
{
|
|
||||||
if (IS_DEBUG_OSPF_NSSA)
|
|
||||||
zlog_debug ("ospf_abr_announce_nssa_defaults(): "
|
|
||||||
"announcing 0.0.0.0/0 to this nssa");
|
|
||||||
/* ospf_abr_announce_nssa_asbr_to_as (&p, area->default_cost, area); */
|
|
||||||
/*ospf_abr_announce_network_to_area (&p, area->default_cost, area);*/
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ospf_abr_announce_stub_defaults (struct ospf *ospf)
|
ospf_abr_announce_stub_defaults (struct ospf *ospf)
|
||||||
{
|
{
|
||||||
|
@ -272,61 +272,6 @@ ospf_route_install (struct ospf *ospf, struct route_table *rt)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
ospf_intra_route_add (struct route_table *rt, struct vertex *v,
|
|
||||||
struct ospf_area *area)
|
|
||||||
{
|
|
||||||
struct route_node *rn;
|
|
||||||
struct ospf_route *or;
|
|
||||||
struct prefix_ipv4 p;
|
|
||||||
struct ospf_path *path;
|
|
||||||
struct vertex_parent *parent;
|
|
||||||
struct listnode *node, *nnode;
|
|
||||||
|
|
||||||
p.family = AF_INET;
|
|
||||||
p.prefix = v->id;
|
|
||||||
if (v->type == OSPF_VERTEX_ROUTER)
|
|
||||||
p.prefixlen = IPV4_MAX_BITLEN;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
struct network_lsa *lsa = (struct network_lsa *) v->lsa;
|
|
||||||
p.prefixlen = ip_masklen (lsa->mask);
|
|
||||||
}
|
|
||||||
apply_mask_ipv4 (&p);
|
|
||||||
|
|
||||||
rn = route_node_get (rt, (struct prefix *) &p);
|
|
||||||
if (rn->info)
|
|
||||||
{
|
|
||||||
zlog_warn ("Same routing information exists for %s", inet_ntoa (v->id));
|
|
||||||
route_unlock_node (rn);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
or = ospf_route_new ();
|
|
||||||
|
|
||||||
if (v->type == OSPF_VERTEX_NETWORK)
|
|
||||||
{
|
|
||||||
or->type = OSPF_DESTINATION_NETWORK;
|
|
||||||
|
|
||||||
for (ALL_LIST_ELEMENTS (v->parents, node, nnode, parent))
|
|
||||||
{
|
|
||||||
path = ospf_path_new ();
|
|
||||||
path->nexthop = parent->nexthop->router;
|
|
||||||
listnode_add (or->paths, path);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
or->type = OSPF_DESTINATION_ROUTER;
|
|
||||||
|
|
||||||
or->id = v->id;
|
|
||||||
or->u.std.area_id = area->area_id;
|
|
||||||
or->u.std.external_routing= area->external_routing;
|
|
||||||
or->path_type = OSPF_PATH_INTRA_AREA;
|
|
||||||
or->cost = v->distance;
|
|
||||||
|
|
||||||
rn->info = or;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* RFC2328 16.1. (4). For "router". */
|
/* RFC2328 16.1. (4). For "router". */
|
||||||
void
|
void
|
||||||
ospf_intra_add_router (struct route_table *rt, struct vertex *v,
|
ospf_intra_add_router (struct route_table *rt, struct vertex *v,
|
||||||
|
@ -1042,6 +1042,7 @@ ospf_rtrs_free (struct route_table *rtrs)
|
|||||||
route_table_finish (rtrs);
|
route_table_finish (rtrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
static void
|
static void
|
||||||
ospf_rtrs_print (struct route_table *rtrs)
|
ospf_rtrs_print (struct route_table *rtrs)
|
||||||
{
|
{
|
||||||
@ -1101,6 +1102,7 @@ ospf_rtrs_print (struct route_table *rtrs)
|
|||||||
|
|
||||||
zlog_debug ("ospf_rtrs_print() end");
|
zlog_debug ("ospf_rtrs_print() end");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Calculating the shortest-path tree for an area. */
|
/* Calculating the shortest-path tree for an area. */
|
||||||
static void
|
static void
|
||||||
|
@ -3732,7 +3732,7 @@ show_as_external_lsa_detail (struct vty *vty, struct ospf_lsa *lsa)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* N.B. This function currently seems to be unused. */
|
#if 0
|
||||||
static int
|
static int
|
||||||
show_as_external_lsa_stdvty (struct ospf_lsa *lsa)
|
show_as_external_lsa_stdvty (struct ospf_lsa *lsa)
|
||||||
{
|
{
|
||||||
@ -3756,6 +3756,7 @@ show_as_external_lsa_stdvty (struct ospf_lsa *lsa)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Show AS-NSSA-LSA detail information. */
|
/* Show AS-NSSA-LSA detail information. */
|
||||||
static int
|
static int
|
||||||
|
@ -1205,6 +1205,7 @@ ospf_area_nssa_translator_role_set (struct ospf *ospf, struct in_addr area_id,
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
/* XXX: unused? Leave for symmetry? */
|
/* XXX: unused? Leave for symmetry? */
|
||||||
static int
|
static int
|
||||||
ospf_area_nssa_translator_role_unset (struct ospf *ospf,
|
ospf_area_nssa_translator_role_unset (struct ospf *ospf,
|
||||||
@ -1222,6 +1223,7 @@ ospf_area_nssa_translator_role_unset (struct ospf *ospf,
|
|||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
ospf_area_export_list_set (struct ospf *ospf,
|
ospf_area_export_list_set (struct ospf *ospf,
|
||||||
|
Loading…
Reference in New Issue
Block a user