ospf6d: Add the missing ospf6 running check in show cmds

SYMPTOM:

If some of the ospfv3 commands like 'show ipv6 ospf6 route' are executed
with ospf6d daemon running but before having any ospfv3 configuration, then
ospf6d crash is seen.

ISSUE:

There are a few show commands, which are (unlike others) not checking if
ospf6 instance is initialized already.

FIX:

Add the missing checks, by using OSPF6_CMD_CHECK_RUNNING() in the commands
where its needed and not yet used.

Signed-off-by: Vipin Kumar <vipin@cumulusnetworks.com>
Reviewed-by: Pradosh Mohapatra <pmohapat@cumulusnetworks.com>
             Dinesh Dutt <ddutt@cumulusnetworks.com>
diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c
index 145a88e..7ec4309 100644
--- a/ospf6d/ospf6_top.c
+++ b/ospf6d/ospf6_top.c
@@ -1155,6 +1155,8 @@
        ROUTE_STR
        )
 {
+  OSPF6_CMD_CHECK_RUNNING ();
+
   ospf6_route_table_show (vty, argc, argv, ospf6->route_table);
   return CMD_SUCCESS;
 }
@@ -1186,6 +1188,8 @@
   const char *sargv[CMD_ARGC_MAX];
   int i, sargc;
 
+  OSPF6_CMD_CHECK_RUNNING ();
+
   /* copy argv to sargv and then append "match" */
   for (i = 0; i < argc; i++)
     sargv[i] = argv[i];
@@ -1220,6 +1224,8 @@
   sargv[sargc++] = "detail";
   sargv[sargc] = NULL;
 
+  OSPF6_CMD_CHECK_RUNNING ();
+
   ospf6_route_table_show (vty, sargc, sargv, ospf6->route_table);
   return CMD_SUCCESS;
 }
@@ -1284,6 +1290,8 @@
   sargv[sargc++] = "detail";
   sargv[sargc] = NULL;
 
+  OSPF6_CMD_CHECK_RUNNING ();
+
   ospf6_route_table_show (vty, sargc, sargv, ospf6->route_table);
   return CMD_SUCCESS;
 }