diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-05-20 03:03:41 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-05-20 03:03:41 +0200 |
commit | b52a8a52c1bf7788f8ca7a130da95c6c07b066a1 (patch) | |
tree | d8de4f7db0eda8a01633b9b7da9b4c69fa2e46d8 /ospf6d/ospf6_top.c | |
parent | Support for 'clear ipv6 ospf6 interface [ifname] (diff) | |
download | frr-b52a8a52c1bf7788f8ca7a130da95c6c07b066a1.tar.xz frr-b52a8a52c1bf7788f8ca7a130da95c6c07b066a1.zip |
ospf6d: ospfv3-show-cmds-instance-check-fix.patch
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>
Diffstat (limited to 'ospf6d/ospf6_top.c')
-rw-r--r-- | ospf6d/ospf6_top.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index a08826d63..b24bf73cc 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -724,6 +724,8 @@ DEFUN (show_ipv6_ospf6_route, ROUTE_STR ) { + OSPF6_CMD_CHECK_RUNNING (); + ospf6_route_table_show (vty, argc, argv, ospf6->route_table); return CMD_SUCCESS; } @@ -755,6 +757,8 @@ DEFUN (show_ipv6_ospf6_route_match, 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]; @@ -789,6 +793,8 @@ DEFUN (show_ipv6_ospf6_route_match_detail, sargv[sargc++] = "detail"; sargv[sargc] = NULL; + OSPF6_CMD_CHECK_RUNNING (); + ospf6_route_table_show (vty, sargc, sargv, ospf6->route_table); return CMD_SUCCESS; } @@ -853,6 +859,8 @@ DEFUN (show_ipv6_ospf6_route_type_detail, sargv[sargc++] = "detail"; sargv[sargc] = NULL; + OSPF6_CMD_CHECK_RUNNING (); + ospf6_route_table_show (vty, sargc, sargv, ospf6->route_table); return CMD_SUCCESS; } |