summaryrefslogtreecommitdiffstats
path: root/ospfd/ospfd.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd/ospfd.c')
-rw-r--r--ospfd/ospfd.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c
index c951a29a..965d31f9 100644
--- a/ospfd/ospfd.c
+++ b/ospfd/ospfd.c
@@ -782,12 +782,13 @@ ospf_network_unset (struct ospf *ospf, struct prefix_ipv4 *p,
return 0;
network = rn->info;
+ route_unlock_node (rn);
if (!IPV4_ADDR_SAME (&area_id, &network->area_id))
return 0;
ospf_network_free (ospf, rn->info);
rn->info = NULL;
- route_unlock_node (rn);
+ route_unlock_node (rn); /* initial reference */
/* Find interfaces that not configured already. */
for (ALL_LIST_ELEMENTS (ospf->oiflist, node, nnode, oi))
@@ -1024,13 +1025,13 @@ ospf_remove_vls_through_area (struct ospf *ospf, struct ospf_area *area)
}
-struct message ospf_area_type_msg[] =
+static const struct message ospf_area_type_msg[] =
{
{ OSPF_AREA_DEFAULT, "Default" },
{ OSPF_AREA_STUB, "Stub" },
{ OSPF_AREA_NSSA, "NSSA" },
};
-int ospf_area_type_msg_max = OSPF_AREA_TYPE_MAX;
+static const int ospf_area_type_msg_max = OSPF_AREA_TYPE_MAX;
static void
ospf_area_type_set (struct ospf_area *area, int type)
@@ -1253,7 +1254,8 @@ ospf_area_nssa_translator_role_set (struct ospf *ospf, struct in_addr area_id,
return 1;
}
-/* XXX: unused? Leave for symmetry? */
+#if 0
+/* unsed? Leave for symmetry? */
static int
ospf_area_nssa_translator_role_unset (struct ospf *ospf,
struct in_addr area_id)
@@ -1270,6 +1272,7 @@ ospf_area_nssa_translator_role_unset (struct ospf *ospf,
return 1;
}
+#endif
int
ospf_area_export_list_set (struct ospf *ospf,
@@ -1390,10 +1393,8 @@ ospf_nbr_nbma_new (void)
{
struct ospf_nbr_nbma *nbr_nbma;
- nbr_nbma = XMALLOC (MTYPE_OSPF_NEIGHBOR_STATIC,
+ nbr_nbma = XCALLOC (MTYPE_OSPF_NEIGHBOR_STATIC,
sizeof (struct ospf_nbr_nbma));
- memset (nbr_nbma, 0, sizeof (struct ospf_nbr_nbma));
-
nbr_nbma->priority = OSPF_NEIGHBOR_PRIORITY_DEFAULT;
nbr_nbma->v_poll = OSPF_POLL_INTERVAL_DEFAULT;