From cf1ce250d20003ae94c835e73e95e7442d7a5b53 Mon Sep 17 00:00:00 2001 From: Paul Jakma Date: Mon, 15 May 2006 10:46:07 +0000 Subject: [ospf6d] GNU Zebra #3562: ABR Crash fix, memory fixes, route table debugs 2006-02-22 Yasuhiro Ohara * valgrind check and memory fix * route table identification string added * ospf6d.h: version 0.9.7q --- ospf6d/ospf6_area.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'ospf6d/ospf6_area.c') diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c index 9368defe..94283dba 100644 --- a/ospf6d/ospf6_area.c +++ b/ospf6d/ospf6_area.c @@ -149,14 +149,19 @@ ospf6_area_create (u_int32_t area_id, struct ospf6 *o) oa->lsdb->hook_remove = ospf6_area_lsdb_hook_remove; oa->lsdb_self = ospf6_lsdb_create (oa); - oa->spf_table = ospf6_route_table_create (); - oa->route_table = ospf6_route_table_create (); + oa->spf_table = OSPF6_ROUTE_TABLE_CREATE (AREA, SPF_RESULTS); + oa->spf_table->scope = oa; + oa->route_table = OSPF6_ROUTE_TABLE_CREATE (AREA, ROUTES); + oa->route_table->scope = oa; oa->route_table->hook_add = ospf6_area_route_hook_add; oa->route_table->hook_remove = ospf6_area_route_hook_remove; - oa->range_table = ospf6_route_table_create (); - oa->summary_prefix = ospf6_route_table_create (); - oa->summary_router = ospf6_route_table_create (); + oa->range_table = OSPF6_ROUTE_TABLE_CREATE (AREA, PREFIX_RANGES); + oa->range_table->scope = oa; + oa->summary_prefix = OSPF6_ROUTE_TABLE_CREATE (AREA, SUMMARY_PREFIXES); + oa->summary_prefix->scope = oa; + oa->summary_router = OSPF6_ROUTE_TABLE_CREATE (AREA, SUMMARY_ROUTERS); + oa->summary_router->scope = oa; /* set default options */ OSPF6_OPT_SET (oa->options, OSPF6_OPT_V6); @@ -719,7 +724,7 @@ DEFUN (show_ipv6_ospf6_simulate_spf_tree_root, tmp_debug_ospf6_spf = conf_debug_ospf6_spf; conf_debug_ospf6_spf = 0; - spf_table = ospf6_route_table_create (); + spf_table = OSPF6_ROUTE_TABLE_CREATE (NONE, SPF_RESULTS); ospf6_spf_calculation (router_id, spf_table, oa); conf_debug_ospf6_spf = tmp_debug_ospf6_spf; -- cgit v1.2.3 From 6ac29a51075def99217a4ab1015635db3b3e83ed Mon Sep 17 00:00:00 2001 From: Paul Jakma Date: Fri, 15 Aug 2008 13:45:30 +0100 Subject: [trivia] finish off static'ification of ospf6d and ripngd 2008-08-15 Paul Jakma * {ospf6d,ripngd}/*: Finish job of marking functions as static, or exporting declarations for them, to quell warning noise with Quagga's GCC default high-level of warning flags. Thus allowing remaining, more useful warnings to be more easily seen. --- ospf6d/ospf6_area.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'ospf6d/ospf6_area.c') diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c index 94283dba..3bfc0cae 100644 --- a/ospf6d/ospf6_area.c +++ b/ospf6d/ospf6_area.c @@ -54,7 +54,7 @@ ospf6_area_cmp (void *va, void *vb) } /* schedule routing table recalculation */ -void +static void ospf6_area_lsdb_hook_add (struct ospf6_lsa *lsa) { switch (ntohs (lsa->header->type)) @@ -84,7 +84,7 @@ ospf6_area_lsdb_hook_add (struct ospf6_lsa *lsa) } } -void +static void ospf6_area_lsdb_hook_remove (struct ospf6_lsa *lsa) { switch (ntohs (lsa->header->type)) @@ -114,14 +114,14 @@ ospf6_area_lsdb_hook_remove (struct ospf6_lsa *lsa) } } -void +static void ospf6_area_route_hook_add (struct ospf6_route *route) { struct ospf6_route *copy = ospf6_route_copy (route); ospf6_route_add (copy, ospf6->route_table); } -void +static void ospf6_area_route_hook_remove (struct ospf6_route *route) { struct ospf6_route *copy; @@ -230,7 +230,7 @@ ospf6_area_lookup (u_int32_t area_id, struct ospf6 *ospf6) return (struct ospf6_area *) NULL; } -struct ospf6_area * +static struct ospf6_area * ospf6_area_get (u_int32_t area_id, struct ospf6 *o) { struct ospf6_area *oa; @@ -364,7 +364,7 @@ ALIAS (area_range, OSPF6_AREA_ID_STR "Configured address range\n" "Specify IPv6 prefix\n" - ); + ) DEFUN (no_area_range, no_area_range_cmd, @@ -746,7 +746,7 @@ DEFUN (show_ipv6_ospf6_simulate_spf_tree_root, } void -ospf6_area_init () +ospf6_area_init (void) { install_element (VIEW_NODE, &show_ipv6_ospf6_spf_tree_cmd); install_element (VIEW_NODE, &show_ipv6_ospf6_area_spf_tree_cmd); -- cgit v1.2.3