summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_top.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospf6d/ospf6_top.c')
-rw-r--r--ospf6d/ospf6_top.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c
index f59b6f95..ce21f979 100644
--- a/ospf6d/ospf6_top.c
+++ b/ospf6d/ospf6_top.c
@@ -114,8 +114,7 @@ ospf6_create (void)
{
struct ospf6 *o;
- o = XMALLOC (MTYPE_OSPF6_TOP, sizeof (struct ospf6));
- memset (o, 0, sizeof (struct ospf6));
+ o = XCALLOC (MTYPE_OSPF6_TOP, sizeof (struct ospf6));
/* initialize */
gettimeofday (&o->starttime, (struct timezone *) NULL);
@@ -144,6 +143,7 @@ ospf6_create (void)
return o;
}
+#if 0
static void
ospf6_delete (struct ospf6 *o)
{
@@ -164,6 +164,7 @@ ospf6_delete (struct ospf6 *o)
XFREE (MTYPE_OSPF6_TOP, o);
}
+#endif
static void
ospf6_enable (struct ospf6 *o)
@@ -404,6 +405,13 @@ DEFUN (no_ospf6_interface_area,
return CMD_SUCCESS;
}
+ /* Verify Area */
+ if (oi->area == NULL)
+ {
+ vty_out (vty, "No such Area-ID: %s%s", argv[1], VNL);
+ return CMD_SUCCESS;
+ }
+
if (oi->area->area_id != area_id)
{
vty_out (vty, "Wrong Area-ID: %s is attached to area %s%s",
@@ -562,7 +570,7 @@ ALIAS (show_ipv6_ospf6_route_match,
ROUTE_STR
"Specify IPv6 prefix\n"
"Display routes longer than the specified route\n"
- )
+ );
DEFUN (show_ipv6_ospf6_route_match_detail,
show_ipv6_ospf6_route_longer_detail_cmd,
@@ -651,7 +659,7 @@ config_write_ospf6 (struct vty *vty)
}
/* OSPF6 node structure. */
-struct cmd_node ospf6_node =
+static struct cmd_node ospf6_node =
{
OSPF6_NODE,
"%s(config-ospf6)# ",
@@ -668,6 +676,7 @@ ospf6_top_init (void)
install_element (VIEW_NODE, &show_ipv6_ospf6_cmd);
install_element (ENABLE_NODE, &show_ipv6_ospf6_cmd);
install_element (CONFIG_NODE, &router_ospf6_cmd);
+ install_element (CONFIG_NODE, &no_router_ospf6_cmd);
install_element (VIEW_NODE, &show_ipv6_ospf6_route_cmd);
install_element (VIEW_NODE, &show_ipv6_ospf6_route_detail_cmd);
@@ -690,7 +699,6 @@ ospf6_top_init (void)
install_element (OSPF6_NODE, &ospf6_router_id_cmd);
install_element (OSPF6_NODE, &ospf6_interface_area_cmd);
install_element (OSPF6_NODE, &no_ospf6_interface_area_cmd);
- install_element (OSPF6_NODE, &no_router_ospf6_cmd);
}